refactor: check qemu-img, qemu-system-x86_64 and curl are executable

This commit is contained in:
Martin Wimpress 2024-05-14 23:45:37 +01:00 committed by Martin Wimpress
parent 989ad37d65
commit 6528520d0f
2 changed files with 3 additions and 3 deletions

View File

@ -1804,8 +1804,8 @@ readonly VERSION="4.9.5"
# TODO: Make this run the native architecture binary
QEMU=$(command -v qemu-system-x86_64)
QEMU_IMG=$(command -v qemu-img)
if [ ! -e "${QEMU}" ] || [ ! -e "${QEMU_IMG}" ]; then
echo "ERROR! QEMU not found. Please make install qemu-system-x86_64 and qemu-img"
if [ ! -x "${QEMU}" ] || [ ! -x "${QEMU_IMG}" ]; then
echo "ERROR! QEMU not found. Please make sure 'qemu-system-x86_64' and 'qemu-img' are installed."
exit 1
fi

View File

@ -3391,7 +3391,7 @@ fi
I18NS=()
OPERATION=""
CURL=$(command -v curl)
if [ ! -e "${CURL}" ]; then
if [ ! -x "${CURL}" ]; then
echo "ERROR! curl not found. Please install curl"
exit 1
fi