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 \