From: Tim Yamin Date: Fri, 2 Apr 2004 20:40:41 +0000 (+0000) Subject: Added an error message for mistyped options [ Bug #45946 ] and also shortened X-Git-Tag: v3.4.10.902~649 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c41558c7baf25c7d78bc8033b4b53fc8bfbddbae;p=genkernel.git Added an error message for mistyped options [ Bug #45946 ] and also shortened the help list into two sections: a long one specified by --help and a short default one. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@103 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- diff --git a/gen_cmdline.sh b/gen_cmdline.sh index 3dadab6..a242972 100755 --- a/gen_cmdline.sh +++ b/gen_cmdline.sh @@ -1,6 +1,6 @@ #!/bin/bash -usage() { +longusage() { echo "Gentoo Linux Genkernel ${GK_V}" echo "Usage: " echo " genkernel [options] action" @@ -66,6 +66,20 @@ usage() { echo " will be included." } +usage() { + echo "Gentoo Linux Genkernel ${GK_V}" + echo "Usage: " + echo " genkernel [options] all" + echo + echo "Some useful options:" + echo " --menuconfig Run menuconfig after oldconfig" + echo " --no-clean Do not run make clean before compilation" + echo " --no-mrproper Do not run make mrproper before compilation" + echo + echo "For a detailed list of supported options and flags; issue:" + echo " genkernel --help" +} + parse_opt() { case "$1" in *\=*) @@ -244,9 +258,14 @@ parse_cmdline() { BUILD_KERNEL=1 ;; --help) - usage + longusage + exit 1 + ;; + *) + echo "Error: Unknown option '$*'!" exit 1 ;; esac } +