
Dear Mike Frysinger,
In message 201010170713.02380.vapier@gentoo.org you wrote:
On Sunday, October 17, 2010 06:31:33 Wolfgang Denk wrote:
+TEMP=`getopt -o a:c:v:s: --long arch:,cpu:,vendor:,soc: \
-n 'MAKEALL' -- "$@"`
perhaps split the short/long opts out into dedicated variables to make updating easier ?
SHORT_OPTS="a:c:v:s:" LONG_OPTS="arch:,cpu:,vendor:,soc:" ... TEMP=`getopt -o ${SHORT_OPTS} --long ${LONG_OPTS} ......
Good idea. Will do.
+while true ; do
case "$1" in
- -a|--arch)
mixing of spaces & tabs for indentation ...
Ouch. Will fix.
echo "Internal error!" ; exit 1 ;;
send to stderr ? echo ... 1>&2
Agree. Will fix.
+# echo "Remaining arguments:" +# for arg do echo '--> '"`$arg'" ; done
the for loop can be done in a single printf: printf '--> '"`%s'\n" "$@"
Yes, but it's only a disabled debug help, and TIMTOWTDI... I think this doesn;t hurt. Left unchanged.
- SELECTED="$(awk '('"$FILTER"') { print $1 }' boards.cfg)"
dont really need the outermost quotes: var=$(echo a b c) works just fine
Agreed, will fix.
-#----- for now, just run PowerPC by default ----- -[ $# = 0 ] && set -- powerpc +# Build target groups selected by options, plus any command line args +if [ "$SELECTED" ] ; then
- build_targets $SELECTED "$@"
+else
- # run PowerPC by default
- [ $# = 0 ] && set -- powerpc
-build_targets "$@"
- build_targets "$@"
+fi
i dont think you need to be so stringent about the value of SELECTED. this> should the same: # Build target groups selected by options, plus any command line args set -- ${SELECTED} "$@" # run PowerPC by default [ $# = 0 ] && set -- powerpc build_targets "$@"
Agreed, will fix.
Best regards,
Wolfgang Denk