1
0
mirror of https://github.com/foxlet/macOS-Simple-KVM.git synced 2024-06-02 06:03:31 +02:00

Skip qcow-img create if macOS.qcow2 exists already

This commit is contained in:
Kowalski Prime 2020-05-03 23:26:12 +02:00
parent 27e8ee170d
commit d1b9767829
No known key found for this signature in database
GPG Key ID: C4E819BD2BC6233E

View File

@ -57,7 +57,11 @@ install(){
## TODO do some input validation
echo Creating system disk $BOXES_HOME/macOS.qcow2 of size $STORAGE
qemu-img create -f qcow2 $BOXES_HOME/macOS.qcow2 $STORAGE
if [[ -e $BOXES_HOME/macOS.qcow2 ]]; then
echo "macOS.qcow2 already exist, skipping"
else
qemu-img create -f qcow2 $BOXES_HOME/macOS.qcow2 $STORAGE
fi
echo Coping BaseSystem.img and ESP.qcow2 in $BOXES_HOME
cp -Zfu BaseSystem.img $BOXES_HOME
cp -Zfu ESP.qcow2 $BOXES_HOME