kernel: Fix that the help is not printed twice

While running the build-kernel.sh script with no arguments, the help is
printed twice. This PR will fix that.

Fixes #433

Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
This commit is contained in:
Gabriela Cervantes 2019-12-02 15:48:42 -06:00
parent 0b3f5c7570
commit 0d840850ae
2 changed files with 4 additions and 3 deletions

View File

@ -58,6 +58,7 @@ PREFIX="${PREFIX:-/usr}"
source "${script_dir}/../scripts/lib.sh"
usage() {
exit_code="$1"
cat <<EOT
Overview:
@ -86,6 +87,7 @@ Options:
-t : Hypervisor_target.
-v : Kernel version to use if kernel path not provided.
EOT
exit "$exit_code"
}
# Convert architecture to the name used by the Linux kernel build system
@ -399,8 +401,7 @@ main() {
experimental_kernel="true"
;;
h)
usage
exit 0
usage 0
;;
k)
kernel_path="${OPTARG}"

View File

@ -1 +1 @@
55
56