diff --git a/live-build.sh b/live-build.sh index e9b4286..7c0fd49 100755 --- a/live-build.sh +++ b/live-build.sh @@ -23,6 +23,10 @@ Options: OPTS=$(getopt -a -n live-build -o l:,o:,d,h \ -l live-image:,output-dir:,debug,help -- "$@") +function is_in_path() { + builtin type -P "${1}" +} + function usage() { echo "$__usage" } @@ -52,7 +56,10 @@ if [ -e "/sys/fs/selinux/enforce" ]; then fi fi -if [ ! -x "/usr/bin/kiwi-ng" ] || [ ! -x "$HOME/.local/bin/kiwi-ng" ]; then +is_in_path kiwi-ng &> /dev/null +ret_val=$? + +if [ "$ret_val" -ne "0" ]; then echo "kiwi-ng not found. kiwi packages are likely not installed on this system." exit 32 fi