Fix disk-image-create's getopt error handling:

We originally checked the return code of getopt, but subsequently
a debugging echo has been inserted and now we are checking the
return code of "echo", which is very rarely going to be useful.

Change-Id: I054fecaf6576d5e9d42b07159bba7d50335bf6cc
This commit is contained in:
Chris Jones 2012-12-17 17:00:13 +00:00
parent d212ffd1db
commit 219aa52958

View File

@ -32,8 +32,8 @@ function show_options () {
COMPRESS_IMAGE="true"
TEMP=`getopt -o a:ho:xu -n $SCRIPTNAME -- "$@"`
echo "XXX $TEMP"
if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
echo "XXX $TEMP"
# Note the quotes around `$TEMP': they are essential!
eval set -- "$TEMP"