update create-image.sh to fail early
This commit is contained in:
parent
e23550a13f
commit
dbec569339
@ -8,7 +8,17 @@ IMAGE_NAME="${APPLIANCE_NAME}-$(TZ='UTC' date +%Y.%m.%d-%H%M%S).raw"
|
||||
COMPRESSED_IMAGE_NAME="${IMAGE_NAME}.zst"
|
||||
|
||||
if [[ ${EUID} -ne 0 ]]; then
|
||||
>&2 echo "ERROR: Please run this script as root"
|
||||
>&2 echo "$0: error: Please run this script as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v appliance-creator > /dev/null; then
|
||||
>&2 echo "$0: error: unable to find command 'appliance-creator'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v shasum > /dev/null; then
|
||||
>&2 echo "$0: error: unable to find command 'shasum'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user