mirror of
https://github.com/lukechilds/dockerpi.git
synced 2026-01-23 02:14:37 +00:00
Throw helpful error if no filesystem image exists
This commit is contained in:
parent
56ee642798
commit
2956999797
1 changed files with 9 additions and 5 deletions
|
|
@ -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 \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue