From 98d03dda6a0c76dffcadf51e693a01757cedfe44 Mon Sep 17 00:00:00 2001 From: Nils Freydank Date: Sun, 5 May 2024 18:28:45 +0200 Subject: [PATCH] control-vm.sh: Move the BASE_DIR to pwd --- control-vm.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/control-vm.sh b/control-vm.sh index 6cef9c6..68507f0 100755 --- a/control-vm.sh +++ b/control-vm.sh @@ -36,10 +36,10 @@ # or ./control-vm.sh Gentoo-guest shudown # # You should now have a setup like: -# ${HOME}/vm/ -# ${HOME}/vm/control-vm.sh -# ${HOME}/vm/Gentoo-guest-1/virtual-machine.img -# ${HOME}/vm/Gentoo-guest-1/virtual-machine.bash +# $(pwd)/ +# $(pwd)/control-vm.sh +# $(pwd)/Gentoo-guest-1/virtual-machine.img +# $(pwd)/Gentoo-guest-1/virtual-machine.bash # === Configuration of the guest === # Create a file with the guest's parameters and name it same as the "GUEST_NAME" @@ -84,8 +84,8 @@ SSH_PORT="${SSH_PORT:-}" UI="${UI:-}" # Define paths. # Note: Sort in alphabetical order as long as inheritance is respected. -BASE_PATH="${BASE_PATH:-${HOME}/vm/${GUEST_NAME}}" -GUEST_CONFIG_FILE="${HOME}/vm/${GUEST_NAME}/virtual-machine.bash" +BASE_PATH="$(pwd)/${GUEST_NAME}" +GUEST_CONFIG_FILE="${GUEST_CONFIG_FILE:-${BASE_PATH}/virtual-machine.bash}" IMAGE_PATH="${IMAGE_PATH:-${BASE_PATH}/virtual-machine.img}" ISO_PATH="${ISO_PATH:-${BASE_PATH}/../installer/${GUEST_NAME}.iso}" MONITOR_SOCKET="${MONITOR_SOCKET:-${BASE_PATH}/monitor.socket}"