Merge pull request #838 from GabyCT/topic/fixhelp

kernel: Fix that the help is not printed twice
This commit is contained in:
GabyCT 2019-12-03 12:08:43 -06:00 committed by GitHub
commit ce32fb8689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

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

View File

@ -1 +1 @@
55 56