diff options
| author | 2023-12-18 18:59:25 -0500 | |
|---|---|---|
| committer | 2023-12-19 15:29:19 -0500 | |
| commit | 80a1081de6b90635f934f8cd483e427defc70c37 (patch) | |
| tree | b6aa830785294e9b4877c4d95b3d0ca21c72a32e /kiwi-build | |
| parent | f5632edf2bcc9d76635faa4c8293127725b09ff7 (diff) | |
| download | kiwi-descriptions-80a1081de6b90635f934f8cd483e427defc70c37.tar.gz kiwi-descriptions-80a1081de6b90635f934f8cd483e427defc70c37.zip | |
kiwi-build: Add support for setting the kiwi description directory
Generally, the kiwi descriptions are in the same directory, but
when this script is being called out-of-tree, it needs to be told
where they are.
Diffstat (limited to 'kiwi-build')
| -rwxr-xr-x | kiwi-build | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -8,16 +8,17 @@ set -eu -o pipefail kiwibuildsh="$(basename "$0")" usage() { - echo >&2 "usage: $kiwibuildsh --output-dir=DIR --image-type=TYPE --image-profile=PROFILE [--debug]" - echo >&2 " eg: $kiwibuildsh --output-dir=/var/tmp/work --image-type=oem --image-profile=cloud --debug" + echo >&2 "usage: $kiwibuildsh [--kiwi-description-dir=DIR] --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 --debug" echo >&2 " eg: $kiwibuildsh --output-dir=/var/tmp/work --image-type=oem --image-profile=cloud" exit 255 } -optTemp=$(getopt --options '+o:,t:,p:,d,h' --longoptions 'output-dir:,image-type:,image-profile:,debug,help' --name "$kiwibuildsh" -- "$@") +optTemp=$(getopt --options '+k:,o:,t:,p:,d,h' --longoptions 'kiwi-description-dir:,output-dir:,image-type:,image-profile:,debug,help' --name "$kiwibuildsh" -- "$@") eval set -- "$optTemp" unset optTemp +kiwi_description_dir="./" output_dir= image_type= image_profile= @@ -25,6 +26,7 @@ debug= while true; do case "$1" in + -k|--kiwi-description-dir) kiwi_description_dir="$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 ;; @@ -47,12 +49,10 @@ if [ -e "/sys/fs/selinux/enforce" ]; then fi fi -pushd kiwi-desc - set +e - kiwi-ng ${debug} --type="${image_type}" --profile="${image_profile}" --color-output system build --description "./" --target-dir "${output_dir}" - kiwi_status=$? - set -e -popd +set +e +kiwi-ng ${debug} --type="${image_type}" --profile="${image_profile}" --color-output system build --description "${kiwi_description_dir}" --target-dir "${output_dir}" +kiwi_status=$? +set -e if [ -e "/sys/fs/selinux/enforce" ]; then # Re-enable SELinux enforcement now that image build is done |