2024-01-21 00:20:51 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
|
|
|
# Check if QEMUSH_NAME variable is initialized, abort if not
|
|
|
|
[ -n "$QEMUSH_NAME" ]
|
|
|
|
|
|
|
|
# Choose the base dir to print according to argv[1]
|
|
|
|
case "$1" in
|
|
|
|
socket)
|
2024-01-21 00:28:20 +01:00
|
|
|
path="${HOME}/sockets"
|
2024-01-21 00:20:51 +01:00
|
|
|
;;
|
|
|
|
disk)
|
|
|
|
path="${HOME}/disks"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
false
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Print the base dir and the name of the VM
|
|
|
|
printf %s/%s\\n "$path" "$QEMUSH_NAME"
|