diff --git a/ci/packer.sh b/ci/packer.sh index 88dcab06d..711ca8723 100644 --- a/ci/packer.sh +++ b/ci/packer.sh @@ -17,6 +17,12 @@ if [ "$EUID" -ne 0 ]; then exit 1 fi +# check if internet is available +if ping -c 1 "1.1.1.1" &> /dev/null; then + echo "error='script needs internet connection to run'" + exit 1 +fi + # usage info echo "packer.sh [BRANCH] [arm|x86] [min|fat] [?lastcommithash]" echo "Build RaspiBlitz install images on a Debian LIVE system" @@ -224,6 +230,7 @@ fi echo "# clean up" +cd .. rm -rf raspiblitz 2>/dev/null echo "# SIGN & SECURE IMAGE ###########################################"