Jetzt mit Raspi 64 und neuer Fehlerseite wenn kein Attribut

This commit is contained in:
dewomser 2022-02-04 11:51:02 +01:00
parent b3e1a89f5c
commit badce00de2

View file

@ -16,16 +16,35 @@ Option Bedeutung
-l raspios_lite_armhf Raspberry Pi OS Lite -l raspios_lite_armhf Raspberry Pi OS Lite
-d raspios_armhf Raspberry Pi OS with desktop -d raspios_armhf Raspberry Pi OS with desktop
-h Diese Hilfe -h Diese Hilfe
-f64 raspios_full_arm64
-l64 raspios_lite_arm64
-d64 raspios_arm64
" && exit " && exit
elif [[ "$attribut" = "-f" ]]
then
rimage="raspios_full_armhf"
elif [[ "$attribut" = "-l" ]] elif [[ "$attribut" = "-l" ]]
then then
rimage="raspios_lite_armhf" rimage="raspios_lite_armhf"
elif [[ "$attribut" = "-d" ]] elif [[ "$attribut" = "-d" ]]
then then
rimage="raspios_armhf" rimage="raspios_armhf"
elif [[ "$attribut" = "-f64" ]]
then
rimage="raspios_full_arm64"
elif [[ "$attribut" = "-l64" ]]
then
rimage="raspios_lite_arm64"
elif [[ "$attribut" = "-d64" ]]
then
rimage="raspios_arm64"
else else
rimage="raspios_full_armhf" echo "Kein Pi-Image ausgewählt. \"raspi-install.sh -h \" für Hilfe!" && exit
attribut="-f"
fi fi
#rimage ="raspios_lite_armhf" #rimage ="raspios_lite_armhf"
#rimage="raspios_full_armhf" #rimage="raspios_full_armhf"
@ -34,12 +53,17 @@ cd "$HOME/Downloads" || echo"Downloads Ordner nicht vorhanden"
dirr=$(curl --silent https://downloads.raspberrypi.org/$rimage/images/ | grep -o -E "$rimage-$datum" | tail -1 ) dirr=$(curl --silent https://downloads.raspberrypi.org/$rimage/images/ | grep -o -E "$rimage-$datum" | tail -1 )
echo dirr :: $dirr
pathr="https://downloads.raspberrypi.org/$rimage/images/$dirr/" pathr="https://downloads.raspberrypi.org/$rimage/images/$dirr/"
rname=$(curl --silent "$pathr" | grep -o -E -w "$datum-[[:lower:]-]*\.zip" | head -1) echo pathr :: $pathr
#rname=$(curl --silent "$pathr" | grep -o -E -w "$datum-[[:lower:]-]*\.zip" | head -1)
rname=$(curl --silent "$pathr" | grep -o -E "$datum-[[:alnum:]-]*\.zip" | head -1)
echo rname :: $rname
wget -c "$pathr""$rname" -O "raspi$attribut".zip wget -c "$pathr""$rname" -O "raspi$attribut".zip
#echo Test kompletter Pfad :: "$pathr""$rname" echo Test kompletter Pfad :: "$pathr""$rname"
shaname=$(curl --silent "$pathr" | grep -o -E -w "$datum-[[:lower:]-]*\.zip\.sha256" | head -1) shaname=$(curl --silent "$pathr" | grep -o -E -w "$datum-[[:alnum:]-]*\.zip\.sha256" | head -1)
#echo Test kompletter sha256-Pfad :: $pathr$shaname echo Test kompletter sha256-Pfad :: $pathr$shaname
wget "$pathr""$shaname" -O raspi"$attribut".sha256 wget "$pathr""$shaname" -O raspi"$attribut".sha256
echo "Bitte ein paar Sekunden warten. Der Hash wird erzeugt." echo "Bitte ein paar Sekunden warten. Der Hash wird erzeugt."
sha1=$(shasum -a 256 raspi"$attribut".zip | grep -o -P "[0-9a-z]{40,}") sha1=$(shasum -a 256 raspi"$attribut".zip | grep -o -P "[0-9a-z]{40,}")