mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-06 07:54:22 +01:00
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:
@@ -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}"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
55
|
56
|
||||||
|
|||||||
Reference in New Issue
Block a user