Permalink
Browse files

Display usage information if any unknown cmdline option is used

This is more user friendly than just displaying an error message
  • Loading branch information...
mika committed Jul 27, 2012
1 parent 7dd680b commit 1584694068d5f4a9ae8aa842721e4ad322135183
Showing with 1 addition and 1 deletion.
  1. +1 −1 grml-live
View
@@ -333,7 +333,7 @@ while getopts "a:C:c:d:D:e:g:i:I:o:r:s:t:U:v:AbBFhnNqQuVz" opt; do
U) CHOWN_USER="$OPTARG" ;;
V) VERBOSE="-v" ;;
z) SQUASHFS_ZLIB=1 ;;
- ?) echo "invalid option -$OPTARG" >&2; bailout 1 ;;
+ ?) echo "invalid option -$OPTARG" >&2; usage; bailout 1 ;;
esac
done
shift $(($OPTIND - 1)) # set ARGV to the first not parsed commandline parameter

0 comments on commit 1584694

Please sign in to comment.