From 5dd536f8c412725d2876713289d5c229438e95b9 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 19 Aug 2017 18:41:25 +0200 Subject: [PATCH] Version changed to stretch, don't hard-code Signed-off-by: Knut Ahlers --- flash.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flash.sh b/flash.sh index 342622c..d4d9877 100755 --- a/flash.sh +++ b/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"