Commit 7df1e399 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU install: option to to keep or replace existing sd.img and cf.img, if any

--HG--
branch : qemu
parent ea00f066e8ec
......@@ -501,20 +501,31 @@ patch -N -p1 < ../$ML_PATH/contrib/qemu/$QEMU_NAME.patch
cd ..
# setup the card image
echo
echo "Setting up SD/CF card images..."
if [ -f "sd.img" ] || [ -f "cf.img" ]; then
echo -n "Replace (overwrite) old sd.img and cf.img? [y/n] "
read answer
echo
if test "$answer" == "Y" -o "$answer" == "y"; then
rm -f sd.img cf.img sd.img.xz
fi
fi
# always overwritten
cp -v $ML_PATH/contrib/qemu/sd.img.xz .
if [ ! -f "sd.img" ]; then
echo "Setting up SD card image..."
cp -v $ML_PATH/contrib/qemu/sd.img.xz .
unxz -v sd.img.xz
else
echo "SD image already exists, skipping."
echo "Keeping previous SD image."
fi
if [ ! -f "cf.img" ]; then
echo "Setting up CF card image..."
cp -v sd.img cf.img
else
echo "CF image already exists, skipping."
echo "Keeping previous CF image."
fi
echo ""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment