fix packer script

This commit is contained in:
rootzoll 2024-04-04 12:30:09 +02:00
parent 8b77877d6b
commit 69a18c7375

View file

@ -17,12 +17,6 @@ if [ "$EUID" -ne 0 ]; then
exit 1 exit 1
fi 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 # usage info
echo "packer.sh [BRANCH] [arm|x86] [min|fat] [?lastcommithash]" echo "packer.sh [BRANCH] [arm|x86] [min|fat] [?lastcommithash]"
echo "Build RaspiBlitz install images on a Debian LIVE system" echo "Build RaspiBlitz install images on a Debian LIVE system"
@ -32,6 +26,14 @@ echo "Results will be stored in:"
echo $BUILDFOLDER echo $BUILDFOLDER
echo "Start this script in the root of an writable 128GB NTFS formatted USB drive." echo "Start this script in the root of an writable 128GB NTFS formatted USB drive."
# check if internet is available
if ping -c 1 "1.1.1.1" &> /dev/null; then
echo "# checking internet"
else
echo "error='script needs internet connection to run'"
exit 1
fi
# get parameters # get parameters
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then