]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
support/scripts/mkukimg: Add explicit `-o` option for output file
authorSergiu Moga <sergiu.moga@protonmail.com>
Sat, 20 May 2023 19:46:49 +0000 (22:46 +0300)
committerUnikraft <monkey@unikraft.io>
Fri, 11 Aug 2023 14:28:34 +0000 (14:28 +0000)
Resolve output file ambiguity by explicitly asking for it through
one of the command-line options, `-o`.

Signed-off-by: Sergiu Moga <sergiu.moga@protonmail.com>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #910

support/scripts/mkukimg

index 583c9223ac6495d13077fb09936c0599fbc4b6d9..9f70598d13a32213443234fa25c41463997afe73 100755 (executable)
@@ -3,7 +3,7 @@
 # help menu
 usage()
 {
-       echo "Usage: $0 [options] [output file]"
+       echo "Usage: $0 [options]"
        echo "Creates bootable images from Unikraft kernel images."
        echo ""
        echo "  -h                         Display help and exit"
@@ -14,13 +14,14 @@ usage()
        echo "  -b                         Bootloader: grub (GRUB), ukefi (Unikraft EFI stub)"
        echo "  -a                         Architecture: X64 (x86_64), AA64 (Aarch64)"
        echo "  -d                         Path to Devicetree Blob (optional, for ukefi only!)"
+       echo "  -o                         Path to output file"
        exit 1
 }
 
 # default options
 OPTFORMAT="iso"
 OPTCMDLINE=""
-OPTOUTPUT=${1}
+OPTOUTPUT=
 OPTARCH=
 OPTDTB=
 
@@ -105,7 +106,7 @@ mkukefiiso()
 }
 
 # process options
-while getopts "hk:c:i:f:a:b:d" OPT; do
+while getopts "hk:c:i:f:a:b:d:o:" OPT; do
        case "${OPT}" in
                h)
                        usage
@@ -131,6 +132,9 @@ while getopts "hk:c:i:f:a:b:d" OPT; do
                d)
                        OPTDTB="${OPTARG}"
                        ;;
+               o)
+                       OPTOUTPUT="${OPTARG}"
+                       ;;
                *)
                        usage
                        ;;