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
cleanup-cruft
Tim Yamin 21 years ago
parent 0a61f843f7
commit c41558c7ba

@ -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
}

Loading…
Cancel
Save