1
0
Fork 0
mirror of https://github.com/foxlet/macOS-Simple-KVM.git synced 2024-11-23 11:39:42 +01:00

Don't ask storage size if disk file already present

This commit is contained in:
Kowalski Prime 2020-05-03 23:29:24 +02:00
parent d1b9767829
commit 4868c81cad
No known key found for this signature in database
GPG key ID: C4E819BD2BC6233E

View file

@ -50,9 +50,7 @@ install(){
mkdir -p $BOXES_HOME
mkdir -p $QEMU_HOME/firmware
read -p "How much storage? [$DEFAULT_STORAGE]: " STORAGE
## Use default 60G storage if no storage provided
if [[ -z $STORAGE ]]; then STORAGE=$DEFAULT_STORAGE; fi
## TODO do some input validation
@ -60,6 +58,9 @@ install(){
if [[ -e $BOXES_HOME/macOS.qcow2 ]]; then
echo "macOS.qcow2 already exist, skipping"
else
read -p "How much storage? [$DEFAULT_STORAGE]: " STORAGE
## Use default 60G storage if no storage provided
if [[ -z $STORAGE ]]; then STORAGE=$DEFAULT_STORAGE; fi
qemu-img create -f qcow2 $BOXES_HOME/macOS.qcow2 $STORAGE
fi
echo Coping BaseSystem.img and ESP.qcow2 in $BOXES_HOME