check internet & clean

This commit is contained in:
rootzoll 2024-04-04 12:18:59 +02:00
parent 4325658924
commit 6558fb41f1

View file

@ -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 ###########################################"