From 41e509a0b4aee0a9f339d6d2519651bdad7b9100 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Sun, 15 Dec 2024 18:30:53 -0700 Subject: [PATCH] temporarily disable errexit for kiwi-ng check --- cloud-build.sh | 8 +++++--- container-build.sh | 8 +++++--- live-build.sh | 8 +++++--- sbc-build.sh | 8 +++++--- wsl-build.sh | 8 +++++--- 5 files changed, 25 insertions(+), 15 deletions(-) diff --git a/cloud-build.sh b/cloud-build.sh index b7de8a7..63dd19e 100755 --- a/cloud-build.sh +++ b/cloud-build.sh @@ -27,7 +27,7 @@ OPTS=$(getopt -a -n cloud-build -o c:,o:,p:,d,h \ -l cloud-image:,output-dir:,peridot:,debug,help -- "$@") function is_in_path() { - builtin type -P "${1}" + builtin type -P "${1}" &> /dev/null } function usage() { @@ -55,13 +55,15 @@ fi if [ -e "/sys/fs/selinux/enforce" ]; then enforce_check="$(cat /sys/fs/selinux/enforce)" if [ "$enforce_check" -eq "1" ]; then - printf "${YELLOW}WARNING:${NORMAL} Running with selinux enforcing may cause issues with the final image.\n" + printf "%sWARNING:%s Running with selinux enforcing may cause issues with the final image.\n" "${YELLOW}" "${NORMAL}" printf "Proceed at your own risk.\n" fi fi -is_in_path kiwi-ng &> /dev/null +set +e +is_in_path kiwi-ng ret_val=$? +set -e if [ "$ret_val" -ne "0" ]; then echo "kiwi-ng not found. kiwi packages are likely not installed on this system." diff --git a/container-build.sh b/container-build.sh index 622cb57..9f4aa07 100755 --- a/container-build.sh +++ b/container-build.sh @@ -27,7 +27,7 @@ OPTS=$(getopt -a -n container-build -o c:,o:,p:,d,h \ -l container:,output-dir:,peridot:,debug,help -- "$@") function is_in_path() { - builtin type -P "${1}" + builtin type -P "${1}" &> /dev/null } function usage() { @@ -55,13 +55,15 @@ fi if [ -e "/sys/fs/selinux/enforce" ]; then enforce_check="$(cat /sys/fs/selinux/enforce)" if [ "$enforce_check" -eq "1" ]; then - printf "${YELLOW}WARNING:${NORMAL} Running with selinux enforcing may cause issues with the final image.\n" + printf "%sWARNING:%s Running with selinux enforcing may cause issues with the final image.\n" "${YELLOW}" "${NORMAL}" printf "Proceed at your own risk.\n" fi fi -is_in_path kiwi-ng &> /dev/null +set +e +is_in_path kiwi-ng ret_val=$? +set -e if [ "$ret_val" -ne "0" ]; then echo "kiwi-ng not found. kiwi packages are likely not installed on this system." diff --git a/live-build.sh b/live-build.sh index 02f8501..825eeb9 100755 --- a/live-build.sh +++ b/live-build.sh @@ -28,7 +28,7 @@ OPTS=$(getopt -a -n live-build -o l:,o:,p:,m:,d,h \ -l live-image:,output-dir:,peridot:,minor:,debug,help -- "$@") function is_in_path() { - builtin type -P "${1}" + builtin type -P "${1}" &> /dev/null } function usage() { @@ -57,13 +57,15 @@ fi if [ -e "/sys/fs/selinux/enforce" ]; then enforce_check="$(cat /sys/fs/selinux/enforce)" if [ "$enforce_check" -eq "1" ]; then - printf "${YELLOW}WARNING:${NORMAL} Running with selinux enforcing may cause issues with the final image.\n" + printf "%sWARNING:%s Running with selinux enforcing may cause issues with the final image.\n" "${YELLOW}" "${NORMAL}" printf "Proceed at your own risk.\n" fi fi -is_in_path kiwi-ng &> /dev/null +set +e +is_in_path kiwi-ng ret_val=$? +set -e if [ "$ret_val" -ne "0" ]; then echo "kiwi-ng not found. kiwi packages are likely not installed on this system." diff --git a/sbc-build.sh b/sbc-build.sh index 907a023..5cf7446 100755 --- a/sbc-build.sh +++ b/sbc-build.sh @@ -27,7 +27,7 @@ OPTS=$(getopt -a -n sbc-build -o c:,o:,p:,d,h \ -l sbc-image:,output-dir:,peridot:,debug,help -- "$@") function is_in_path() { - builtin type -P "${1}" + builtin type -P "${1}" &> /dev/null } function usage() { @@ -55,13 +55,15 @@ fi if [ -e "/sys/fs/selinux/enforce" ]; then enforce_check="$(cat /sys/fs/selinux/enforce)" if [ "$enforce_check" -eq "1" ]; then - printf "${YELLOW}WARNING:${NORMAL} Running with selinux enforcing may cause issues with the final image.\n" + printf "%sWARNING:%s Running with selinux enforcing may cause issues with the final image.\n" "${YELLOW}" "${NORMAL}" printf "Proceed at your own risk.\n" fi fi -is_in_path kiwi-ng &> /dev/null +set +e +is_in_path kiwi-ng ret_val=$? +set -e if [ "$ret_val" -ne "0" ]; then echo "kiwi-ng not found. kiwi packages are likely not installed on this system." diff --git a/wsl-build.sh b/wsl-build.sh index 05a053d..b6ec9ed 100755 --- a/wsl-build.sh +++ b/wsl-build.sh @@ -27,7 +27,7 @@ OPTS=$(getopt -a -n wsl-build -o c:,o:,p:,d,h \ -l wsl-image:,output-dir:,peridot:,debug,help -- "$@") function is_in_path() { - builtin type -P "${1}" + builtin type -P "${1}" &> /dev/null } function usage() { @@ -55,13 +55,15 @@ fi if [ -e "/sys/fs/selinux/enforce" ]; then enforce_check="$(cat /sys/fs/selinux/enforce)" if [ "$enforce_check" -eq "1" ]; then - printf "${YELLOW}WARNING:${NORMAL} Running with selinux enforcing may cause issues with the final image.\n" + printf "%sWARNING:%s Running with selinux enforcing may cause issues with the final image.\n" "${YELLOW}" "${NORMAL}" printf "Proceed at your own risk.\n" fi fi -is_in_path kiwi-ng &> /dev/null +set +e +is_in_path kiwi-ng ret_val=$? +set -e if [ "$ret_val" -ne "0" ]; then echo "kiwi-ng not found. kiwi packages are likely not installed on this system."