qemush/qemu/bin/sockpath

17 lines
317 B
Text
Raw Normal View History

#!/bin/sh -e
# 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
[ -n "$QEMUSH_NAME" ]
# Release the trap
trap - EXIT
# Print the actual string
printf %s/%s ~/sockets "$QEMUSH_NAME"