Commit 802327da authored by Arnaud Blanchard's avatar Arnaud Blanchard

Automatically create a temporary TMP_DIR

parent 9e02dd72
......@@ -17,6 +17,12 @@ set -o errexit #Exit on first error
set -o nounset #Error if a variable is used but not defined
set -o pipefail #Error if a pipe fail
blaar_program_name=$(basename $0)
#Create a temporary directory, essencially for logs
TMP_DIR="$(mktemp -d -t $blaar_program_name)"
trap 'rm -rf "$TMP_DIR"' EXIT INT HUP TERM
calc(){
echo $(echo "$@"|bc -l)
}
......@@ -138,5 +144,4 @@ blaar_parse_args(){
return 0
}
blaar_program_name=$(basename $0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment