mirror of
https://code.dumpstack.io/tools/appvm.git
synced 2024-11-05 16:03:18 +00:00
One path for qcow2 images
This commit is contained in:
parent
90a87a0219
commit
9cd51bb13a
1
appvm.sh
1
appvm.sh
|
@ -9,6 +9,7 @@ if [[ "$1" == "build" && "$2" != "" ]]; then
|
|||
mkdir -p bin
|
||||
sed "s;NIX_SYSTEM_PLACEHOLDER;${NIX_SYSTEM};" qemu/qemu.template > bin/appvm.${2}
|
||||
sed -i "s;NAME_PLACEHOLDER;${2};" bin/appvm.${2}
|
||||
sed -i "s;NIX_DISK_IMAGE_PLACEHOLDER;${APPVM_PATH}/qemu/qcow2/${2}.qcow2;" bin/appvm.${2}
|
||||
chmod +x bin/appvm.${2}
|
||||
unlink result
|
||||
else
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
NAME=NAME_PLACEHOLDER
|
||||
|
||||
NIX_DISK_IMAGE=$(readlink -f ${NIX_DISK_IMAGE:-./${NAME}.qcow2})
|
||||
NIX_DISK_IMAGE=NIX_DISK_IMAGE_PLACEHOLDER
|
||||
|
||||
if ! test -e "$NIX_DISK_IMAGE"; then
|
||||
qemu-img create -f qcow2 "$NIX_DISK_IMAGE" 512M || exit 1
|
||||
|
|
Loading…
Reference in a new issue