mirror of
https://github.com/foxlet/macOS-Simple-KVM.git
synced 2024-11-27 05:29:42 +01:00
Don't ask storage size if disk file already present
This commit is contained in:
parent
d1b9767829
commit
4868c81cad
1 changed files with 4 additions and 3 deletions
7
make.sh
7
make.sh
|
@ -50,9 +50,7 @@ install(){
|
||||||
mkdir -p $BOXES_HOME
|
mkdir -p $BOXES_HOME
|
||||||
mkdir -p $QEMU_HOME/firmware
|
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
|
## TODO do some input validation
|
||||||
|
|
||||||
|
@ -60,6 +58,9 @@ install(){
|
||||||
if [[ -e $BOXES_HOME/macOS.qcow2 ]]; then
|
if [[ -e $BOXES_HOME/macOS.qcow2 ]]; then
|
||||||
echo "macOS.qcow2 already exist, skipping"
|
echo "macOS.qcow2 already exist, skipping"
|
||||||
else
|
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
|
qemu-img create -f qcow2 $BOXES_HOME/macOS.qcow2 $STORAGE
|
||||||
fi
|
fi
|
||||||
echo Coping BaseSystem.img and ESP.qcow2 in $BOXES_HOME
|
echo Coping BaseSystem.img and ESP.qcow2 in $BOXES_HOME
|
||||||
|
|
Loading…
Reference in a new issue