[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] Added a check to see if user is running lh_clean from a sane location (i.e. not config/)



On Mon, Nov 12, 2007 at 04:17:06PM -0500, Justin Pryzby wrote:
> > +# Avoid cases were users accidentally nuke their config/binary
> > +if [ $(basename ${PWD}) == "config" ] || [ ! -d "config" ]
> == is a bashism which is for regexes, for posix compatibility use just
> [ a = b ]
>
> Also use [ .. ] && [ .. ] instead of [ .. -a .. ] (the latter is an
> XSI-ism which AIUI is an extension of posix).
> And [ ! .. ] rather than ! [ .. ].
> And [ .. ] rather than [[ .. ]].
> And don't use "function".

And type -- http://bugs.debian.org/397601

Much as I like /bin/sh purity, I wonder if it would be simpler to
change all the shebangs to #/bin/bash?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/debian-live-devel/attachments/20071113/7959a9af/attachment.pgp 


Reply to: