Browse Source

Throw helpful error if no filesystem image exists

pull/1/head
Luke Childs 5 years ago
parent
commit
2956999797
  1. 14
      entrypoint.sh

14
entrypoint.sh

@ -3,11 +3,15 @@
image_path="/sdcard/filesystem.img" image_path="/sdcard/filesystem.img"
zip_path="/filesystem.zip" zip_path="/filesystem.zip"
if [ ! -e $image_path ] && [ -e $zip_path ]; then if [ ! -e $image_path ]; then
echo "No filesystem detected at ${image_path}!" echo "No filesystem detected at ${image_path}!"
echo "Extracting..." if [ -e $zip_path ]; then
unzip $zip_path echo "Extracting fresh filesystem..."
mv *.img $image_path unzip $zip_path
mv *.img $image_path
else
exit 1
fi
fi fi
exec qemu-system-arm \ exec qemu-system-arm \

Loading…
Cancel
Save