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} ......
> +while true ; do
> + case "$1" in
> + -a|--arch)
mixing of spaces & tabs for indentation ...
> + echo "Internal error!" ; exit 1 ;;
send to stderr ?
echo ... 1>&2
> +# echo "Remaining arguments:"
> +# for arg do echo '--> '"\`$arg'" ; done
the for loop can be done in a single printf:
printf '--> '"\`%s'\n" "$@"
> + SELECTED="$(awk '('"$FILTER"') { print $1 }' boards.cfg)"
dont really need the outermost quotes:
var=$(echo a b c)
works just fine
> -#----- 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 "$@"
-mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

