[darcs-users] Wishlist: execute permissions

Norbert Nemec Norbert.Nemec.list at gmx.de
Fri Nov 26 08:19:09 UTC 2004


I do not really like the idea of distinguishing by name. Python files, for 
example, always have the ending ".py", but only some of them should be 
executable as a script. Also, by convention, many sh-script files do not have 
the ending ".sh"

The first line of a script: "#!..." is much more meaningful.


Am Donnerstag, 25. November 2004 07:26 schrieb Manfred Lotz:
> After reading many of the suggestions made in this list I come to the
> conclusion that it is best to have an execute file analogous to boring
> which resides in _darcs/prefs. Somebody made this suggestion already, I
> forgot his name.
>
> The file _darcs/prefs/execute could have entries like this:
>
> # this is a comment
> demo/configure
> *.sh
> # some recursive indicator would be useful to make sure
> # a pattern is looked for in subdirectories also
> *.rb rec
>
>
> Then all files matching the patterns in _darcs/prefs/execute would receive
> the x-bit (provided the underlying OS supports it).
>
> This has to be done for get and pull. Did I miss any command where it
> should apply also?
>
>
>
> For the time being I use a script darcs_execute which does it for me.
> Comment lines are not supported at the moment. The script is supposed to
> be started in the root directory of the darcs repository. Anything in
> directory _darcs and below is ignored.
>
>
> <---snip--->
> #! /bin/sh
>
>
> #VERBOSE=-v
> VERBOSE=
> DEPTH=
>
> test ! -f _darcs/prefs/execute && exit 1
>
> while read fspec recspec
> do
>         test  ! "$recspec" = "rec"  && DEPTH="-maxdepth 1"
>         find . $DEPTH -name "$fspec" | \
>         egrep -v "\.\/_darcs" | \
>         while read f
>         do
>                 chmod $VERBOSE +x $f
>         done
> done < _darcs/prefs/execute
> <---snip--->

-- 
_________________________________________Norbert Nemec
         Bernhardstr. 2 ... D-93053 Regensburg
     Tel: 0941 - 2009638 ... Mobil: 0179 - 7475199
           eMail: <Norbert at Nemec-online.de>




More information about the darcs-users mailing list