1
0
Fork 0
mirror of https://github.com/Luzifer/flashpi.git synced 2024-12-20 10:01:16 +00:00

Version changed to stretch, don't hard-code

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2017-08-19 18:41:25 +02:00
parent 2647a7b46b
commit 5dd536f8c4
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -29,12 +29,12 @@ fi
if ! [ -f "${SOURCE_IMAGE}" ]; then
echo "Did not find SOURCE_IMAGE, downloading / detecting once"
if ( test $(ls -1tr ${STORAGE_DIR}/*raspbian-jessie-lite.img | wc -l) -lt 1 ); then
if ( test $(ls -1tr ${STORAGE_DIR}/*raspbian-*-lite.img | wc -l) -lt 1 ); then
curl -L https://downloads.raspberrypi.org/raspbian_lite_latest -o /tmp/raspbian.zip
unzip /tmp/raspbian.zip -d ${STORAGE_DIR}
rm /tmp/raspbian.zip
fi
SOURCE_IMAGE=$(ls -1tr ${STORAGE_DIR}/*raspbian-jessie-lite.img | head -n1)
SOURCE_IMAGE=$(ls -1tr ${STORAGE_DIR}/*raspbian-*-lite.img | head -n1)
fi
echo "Flashing Raspian image"