Created
June 21, 2016 03:39
-
-
Save hacker65536/eca10a9c36aee735fd2d912c9cb63ff6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eu | |
atexit() { | |
[[ -n $tmpfile ]] && rm -f "$tmpfile" | |
} | |
tmpfile=$(mktemp "/tmp/${0##*/}.tmp.XXXXXX") | |
trap atexit EXIT | |
trap 'atexit; exit -1' SIGHUP SIGINT SIGTERM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment