From 2956999797e68456ac6a95182849fb2b8be20e67 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Sat, 14 Dec 2019 18:39:22 +0700 Subject: [PATCH] Throw helpful error if no filesystem image exists --- entrypoint.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index b17b7cb..aa8ec0c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,11 +3,15 @@ image_path="/sdcard/filesystem.img" zip_path="/filesystem.zip" -if [ ! -e $image_path ] && [ -e $zip_path ]; then - echo "No filesystem detected at ${image_path}!" - echo "Extracting..." - unzip $zip_path - mv *.img $image_path +if [ ! -e $image_path ]; then + echo "No filesystem detected at ${image_path}!" + if [ -e $zip_path ]; then + echo "Extracting fresh filesystem..." + unzip $zip_path + mv *.img $image_path + else + exit 1 + fi fi exec qemu-system-arm \