diff options
| author | 2024-08-09 10:49:58 -0400 | |
|---|---|---|
| committer | 2024-08-09 11:17:35 -0400 | |
| commit | c4d19f7f8e4f725ca9ce8774c00b40549138fef8 (patch) | |
| tree | fc68bccdcce375ac392c3ca9a2061bc0a66bd0a1 /kiwi-build | |
| parent | 40e3039216350519d091b7e262e80a8ea6425088 (diff) | |
| download | kiwi-descriptions-c4d19f7f8e4f725ca9ce8774c00b40549138fef8.tar.gz kiwi-descriptions-c4d19f7f8e4f725ca9ce8774c00b40549138fef8.zip | |
kiwi-build, tmt: Require setting the kiwi filename for the build
In preparation for having multiple top-level kiwi description files,
expose the ability to define which file to read.
Additionally, tests are updated to use this new flag.
Diffstat (limited to 'kiwi-build')
| -rwxr-xr-x | kiwi-build | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -8,28 +8,31 @@ set -eu -o pipefail kiwibuildsh="$(basename "$0")" usage() { - echo >&2 "usage: $kiwibuildsh [--kiwi-description-dir=DIR] [--isolated] --output-dir=DIR --image-type=TYPE --image-profile=PROFILE [--debug]" - echo >&2 " eg: $kiwibuildsh --kiwi-description-dir=/var/tmp/desc --output-dir=/var/tmp/work --image-type=oem --image-profile=Cloud-Base-Generic --debug" + echo >&2 "usage: $kiwibuildsh [--kiwi-description-dir=DIR] [--kiwi-file=FILE] [--isolated] --output-dir=DIR --image-type=TYPE --image-profile=PROFILE [--debug]" + echo >&2 " eg: $kiwibuildsh --kiwi-description-dir=/var/tmp/desc --kiwi-file=config.kiwi --output-dir=/var/tmp/work --image-type=oem --image-profile=Cloud-Base-Generic --debug" echo >&2 " eg: $kiwibuildsh --output-dir=/var/tmp/work --image-type=oem --image-profile=Cloud-Base-Generic" echo >&2 " eg: $kiwibuildsh --isolated --output-dir=/var/tmp/work --image-type=oem --image-profile=Cloud-Base-Generic" exit 255 } -optTemp=$(getopt --options '+k:,i,o:,t:,p:,d,h' --longoptions 'isolated,kiwi-description-dir:,output-dir:,image-type:,image-profile:,debug,help' --name "$kiwibuildsh" -- "$@") +optTemp=$(getopt --options '+k:,f:,i,o:,t:,p:,d,h' --longoptions 'kiwi-description-dir:,kiwi-file:,isolated,output-dir:,image-type:,image-profile:,debug,help' --name "$kiwibuildsh" -- "$@") eval set -- "$optTemp" unset optTemp -kiwi_isolated= -kiwi_description_dir="./" output_dir= image_type= image_profile= debug= +kiwi_isolated= +# For compatibility with older scripts where these did not exist +kiwi_description_dir="./" +kiwi_file="Fedora.kiwi" while true; do case "$1" in -i|--isolated) kiwi_isolated=1; shift ;; -k|--kiwi-description-dir) kiwi_description_dir="$2" ; shift 2 ;; + -f|--kiwi-file) kiwi_file="$2" ; shift 2 ;; -o|--output-dir) output_dir="$2" ; shift 2 ;; -t|--image-type) image_type="$2" ; shift 2 ;; -p|--image-profile) image_profile="$2" ; shift 2 ;; @@ -39,7 +42,7 @@ while true; do esac done -if [ -z "$output_dir" ] || [ -z "$image_type" ] || [ -z "$image_profile" ]; then +if [ -z "$output_dir" ] || [ -z "$image_type" ] || [ -z "$image_profile" ] || [ -z "$kiwi_file" ]; then echo "Options not set!" usage fi @@ -54,9 +57,9 @@ fi set +e if [ ! ${kiwi_isolated} ]; then -kiwi-ng ${debug} --type="${image_type}" --profile="${image_profile}" --color-output system build --description "${kiwi_description_dir}" --target-dir "${output_dir}" +kiwi-ng ${debug} --type="${image_type}" --profile="${image_profile}" --kiwi-file="${kiwi_file}" --color-output system build --description "${kiwi_description_dir}" --target-dir "${output_dir}" else -kiwi-ng ${debug} --type="${image_type}" --profile="${image_profile}" --color-output system boxbuild --box universal --sshfs-sharing -- --description "${kiwi_description_dir}" --target-dir "${output_dir}" +kiwi-ng ${debug} --type="${image_type}" --profile="${image_profile}" --kiwi-file="${kiwi_file}" --color-output system boxbuild --box universal --sshfs-sharing -- --description "${kiwi_description_dir}" --target-dir "${output_dir}" fi kiwi_status=$? set -e |