Compare commits

..

No commits in common. "2cdd2427a22c4001df82dbe5b53232ac50eb53ba" and "ff2a758af66b4ccc8c4091385012dd5f5269f312" have entirely different histories.

View file

@ -35,7 +35,7 @@ perror() {
public_help() {
local name
name="$(basename "$0")"
exec cat << EOF
cat << EOF
${name}: usage:
${name} active - (default behaviour) list active VMs
${name} start <VM name> - start a VM
@ -61,20 +61,20 @@ public_start() {
local vm_name="$1"
shift
exec screen -S "$vm_name" "$vm_name" "$@"
screen -S "$vm_name" "$vm_name" "$@"
}
public_watch() {
exec screen -dr "$1"
screen -dr "$1"
}
public_active() {
exec screen -ls
screen -ls
}
public_ls() {
echo "Available machines:"
exec ls "$bin"
ls "$bin"
}
diskpath() {
@ -82,34 +82,32 @@ diskpath() {
}
public_diskadd() {
exec qemu-img create -f qcow2 "$(diskpath "$1")" "$2"
qemu-img create -f qcow2 "$(diskpath "$1")" "$2"
}
public_diskrm() {
exec rm -vi -- "$(diskpath "$1")"
rm -vi -- "$(diskpath "$1")"
}
public_diskls() {
echo "Available disks:"
exec ls "$images"
ls "$images"
}
public_edit() {
local file="${bin}/${1}"
"$EDITOR" "$file"
exec chmod 740 "$file"
"$EDITOR" "${bin}/${1}"
}
public_rm() {
exec rm -vi -- "${bin}/${1}"
rm -vi -- "${bin}/${1}"
}
public_shell() {
exec bash -i
bash -i
}
public_cat() {
exec "$cat" "${bin}/${1}"
"$cat" "${bin}/${1}"
}
function="$1"