From: Michael Prokop Date: Fri, 27 Jul 2012 12:43:07 +0000 (+0200) Subject: Display usage information if any unknown cmdline option is used X-Git-Tag: v0.19.6~4 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=1584694068d5f4a9ae8aa842721e4ad322135183 Display usage information if any unknown cmdline option is used This is more user friendly than just displaying an error message --- diff --git a/grml-live b/grml-live index 45b93e6..3964cbd 100755 --- a/grml-live +++ b/grml-live @@ -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