set HOME variable when not available, e.g when running with cloud-init

Signed-off-by: Johan Siebens <johan.siebens@gmail.com>
This commit is contained in:
Johan Siebens 2022-06-07 21:04:44 +02:00 committed by Alex Ellis
parent c5b463bee9
commit d29f94a8d4

View File

@ -12,6 +12,13 @@ export REPO="faasd"
# to the arkade binary. # to the arkade binary.
export ARKADE=/usr/local/bin/arkade export ARKADE=/usr/local/bin/arkade
# When running as a startup script (cloud-init), the HOME variable is not always set.
# As it is required for arkade to properly download tools,
# set the variable to /usr/local so arkade will download binaries to /usr/local/.arkade
if [ -z "${HOME}" ]; then
export HOME=/usr/local
fi
version="" version=""
echo "Finding latest version from GitHub" echo "Finding latest version from GitHub"