Skip to content

Commit

Permalink
Fix raspbian lite download address
Browse files Browse the repository at this point in the history
  • Loading branch information
mangelajo committed Jun 11, 2024
1 parent 86647f6 commit 13644d5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions raspbian-lite/scripts/download-latest-raspbian
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -e
LATEST_URL=$(wget -O /dev/null -o - --max-redirect=0 https://downloads.raspberrypi.org/raspios_lite_armhf_latest 2>/dev/null| sed -n "s/^Location: \(.*\) \[following\]$/\1/p")
#LATEST_URL=$(wget -O /dev/null -o - --max-redirect=0 https://downloads.raspberrypi.org/raspios_lite_armhf_latest 2>/dev/null| sed -n "s/^Location: \(.*\) \[following\]$/\1/p")
LATEST_URL=$(curl https://downloads.raspberrypi.org/raspios_lite_armhf_latest -v 2>&1 | sed -n "s/< location: \(.*\)\r$/\1/p")
echo $LATEST_URL
CACHE="./images"
wget "${LATEST_URL}" -np -m -A '*img.xz' -c -P "${CACHE}"
# use the latest compose image
Expand All @@ -17,4 +19,4 @@ if [[ "${LATEST_IMG_FULLPATH}" != "${EXISTING_LINK}" ]]; then
ln -fs "${LATEST_IMG_FULLPATH}" "${CACHE}/latest.raw.xz"
else
echo "We are up-to-date."
fi
fi

0 comments on commit 13644d5

Please sign in to comment.