2024-01-21 01:40:45 +01:00
|
|
|
#!/bin/sh -e
|
2024-01-21 22:41:00 +01:00
|
|
|
|
|
|
|
# Invoked on termination if the last command failed
|
|
|
|
error() { >&2 echo "$(basename "$0"): failed"; }
|
|
|
|
|
|
|
|
# Trap errors
|
|
|
|
trap error EXIT
|
|
|
|
|
|
|
|
# Assert that the QEMUSH_NAME variable is not null
|
2024-01-21 01:40:45 +01:00
|
|
|
[ -n "$QEMUSH_NAME" ]
|
2024-01-21 22:41:00 +01:00
|
|
|
|
|
|
|
# Release the trap
|
|
|
|
trap - EXIT
|
|
|
|
|
|
|
|
# Print the actual string
|
2024-01-21 01:40:45 +01:00
|
|
|
printf %s/%s.qcow2\\n ~/disks "$QEMUSH_NAME"
|