Added bash-support

Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
2020-11-16 12:54:24 +01:00
parent 5b8989ac04
commit fc7dc3f34a
56 changed files with 12377 additions and 1 deletions

View File

@ -0,0 +1,19 @@
#-----------------------------------------------------------------------
# cleanup temporary file in case of a keyboard interrupt (SIGINT)
# or a termination signal (SIGTERM)
#-----------------------------------------------------------------------
function cleanup_temp
{
[ -e $tmpfile ] && rm --force $tmpfile
exit 0
}
trap cleanup_temp SIGHUP SIGINT SIGPIPE SIGTERM
tmpfile=$(mktemp) || { echo "$0: creation of temporary file failed!"; exit 1; }
# use tmpfile ...
rm --force $tmpfile