Eric,
I tried this before as well, but it does not work, at least with my util-linux 2.11z:
./abuild.sh -h LBROOT=-h ls: invalid option -- / Try `ls --help' for more information.
Which is why I ended up doing the workaround I used.
Do you know a fix that actually helps fixing your fix, or shall I revert your changes?
Stefan
* Eric Biederman ebiederm@users.sourceforge.net [041105 09:50]:
Index: abuild.sh
RCS file: /cvsroot/freebios/freebios2/util/abuild/abuild.sh,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** abuild.sh 5 Nov 2004 00:26:31 -0000 1.5 --- abuild.sh 5 Nov 2004 08:50:53 -0000 1.6
*** 254,258 ****
# parse parameters ! args=`getopt -l version,verbose,help,all,target: Vvhat: $*`
if [ $? != 0 ]; then --- 255,259 ----
# parse parameters ! args=`getopt -l version,verbose,help,all,target: Vvhat: -- "$@"`
if [ $? != 0 ]; then
*** 261,278 **** fi
! set -- $args ! for arg ! do ! case $arg in ! -t|--target) shift;target=$1;shift;; ! -a|--all) shift;buildall=true;; ! -v|--verbose) shift;verbose=true;; ! -V|--version) shift;myversion;; ! -h|--help) shift;myhelp;; ! esac done
! # -- is $1 ! LBROOT=$2
# /path/to/freebios2/ --- 262,279 ---- fi
! eval set -- "$args" ! while true ; do ! case $1 in ! -t|--target) shift; target=$1; shift;; ! -a|--all) shift; buildall=true;; ! -v|--verbose) shift; verbose=true;; ! -V|--version) shift; myversion;; ! -h|--help) shift; myhelp;; ! --) shift; break;; ! *) echo "Unrecognized argument" ; exit 1 ;; ! esac done
! LBROOT=$1
# /path/to/freebios2/
*** 280,283 **** --- 281,285 ---- LBROOT=$( cd ../..; pwd ) fi
echo "LBROOT=$LBROOT"
if [ "$target" != "" ]; then