Fix nixos-option, accept long arguments.

svn path=/nixos/trunk/; revision=24631
This commit is contained in:
Nicolas Pierron 2010-11-09 18:42:59 +00:00
parent f319ca67c5
commit 30943d2dc0

View File

@ -66,13 +66,14 @@ for arg; do
sarg="$arg"
while test "$sarg" != "-"; do
case $sarg in
--*) longarg=$arg;;
--*) longarg=$arg; sarg="--";;
-d*) longarg="$longarg --description";;
-v*) longarg="$longarg --value";;
-l*) longarg="$longarg --lookup";;
-i*) longarg="$longarg --install";;
-*) usage;;
esac
# remove the first letter option
sarg="-${sarg#??}"
done
;;