check for kiwi-ng using a builtin
This commit is contained in:
parent
18d5841f3b
commit
a0c42ec8a9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user