[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] contrib/client-side/asvn: only check files, that are part of the subversion repository

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 5 May 2010 21:15:38 +0200

On Wed, May 05, 2010 at 07:03:44PM +0200, Jörg Steffens wrote:
> +function stat_details()
> +{
> + # attention: stat uses other variables as find, eg. %u<->%U
> + local path=${1:-.}
> + stat -c "mode=%a user=%U(%u) group=%G(%g)" "$path"

This isn't portable, e.g. on OpenBSD you get:

stat: unknown option -- c
usage: stat [-FLnq] [-f format | -l | -r | -s | -x] [-t timefmt] [file ...]

Is there a more portable way to get at this information?

In general it's quite hard to write shell scripts that run everywhere.
Maybe just keep the original find-based code, but filter some errors?

Stefan
Received on 2010-05-05 21:16:32 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.