16 lines
317 B
Bash
Executable file
16 lines
317 B
Bash
Executable file
#!/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"
|