Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
magic-lantern
magic-lantern
Commits
5868055e95c2
Commit
7df1e399
authored
Mar 03, 2019
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
contrib/qemu/install.sh
View file @
5868055e
...
...
@@ -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
""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment