From badce00de26a1d276621fb48039cb5a7f7430dfd Mon Sep 17 00:00:00 2001 From: dewomser Date: Fri, 4 Feb 2022 11:51:02 +0100 Subject: [PATCH] Jetzt mit Raspi 64 und neuer Fehlerseite wenn kein Attribut --- raspi-install.sh | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/raspi-install.sh b/raspi-install.sh index 2db7281..75256d0 100755 --- a/raspi-install.sh +++ b/raspi-install.sh @@ -16,16 +16,35 @@ Option Bedeutung -l raspios_lite_armhf Raspberry Pi OS Lite -d raspios_armhf Raspberry Pi OS with desktop -h Diese Hilfe +-f64 raspios_full_arm64 +-l64 raspios_lite_arm64 +-d64 raspios_arm64 " && exit +elif [[ "$attribut" = "-f" ]] +then +rimage="raspios_full_armhf" elif [[ "$attribut" = "-l" ]] then rimage="raspios_lite_armhf" + elif [[ "$attribut" = "-d" ]] then 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 -rimage="raspios_full_armhf" -attribut="-f" +echo "Kein Pi-Image ausgewählt. \"raspi-install.sh -h \" für Hilfe!" && exit fi #rimage ="raspios_lite_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 ) +echo dirr :: $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 -#echo Test kompletter Pfad :: "$pathr""$rname" -shaname=$(curl --silent "$pathr" | grep -o -E -w "$datum-[[:lower:]-]*\.zip\.sha256" | head -1) -#echo Test kompletter sha256-Pfad :: $pathr$shaname +echo Test kompletter Pfad :: "$pathr""$rname" +shaname=$(curl --silent "$pathr" | grep -o -E -w "$datum-[[:alnum:]-]*\.zip\.sha256" | head -1) +echo Test kompletter sha256-Pfad :: $pathr$shaname wget "$pathr""$shaname" -O raspi"$attribut".sha256 echo "Bitte ein paar Sekunden warten. Der Hash wird erzeugt." sha1=$(shasum -a 256 raspi"$attribut".zip | grep -o -P "[0-9a-z]{40,}")