From 1574bc414fe4855b7647d6c557976c604b57d979 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Thu, 23 Mar 2023 09:27:20 +0530 Subject: livevm: shorter livem cmd --- .local/bin/livevm | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.local/bin') diff --git a/.local/bin/livevm b/.local/bin/livevm index 79f7ed6..e83f5c6 100755 --- a/.local/bin/livevm +++ b/.local/bin/livevm @@ -12,6 +12,12 @@ cmd="qemu-system-x86_64 -boot menu=on -enable-kvm -device intel-hda -device hda- [ ! -f "$storage" ] && qemu-img create -f qcow2 "$storage" 30G +if [ "$#" -eq 1 ] && [ -f "$1" ] +then + cmd="${cmd} -cdrom ${1}" + shift +fi + while getopts "wehc:d:" f do case "$f" in -- cgit v1.2.3