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:
parent
2647a7b46b
commit
5dd536f8c4
1 changed files with 2 additions and 2 deletions
4
flash.sh
4
flash.sh
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue