Commit 678585c3 authored by Arnaud Blanchard's avatar Arnaud Blanchard

Display a nice error message if a unexpected error append

parent 894639ef
......@@ -21,7 +21,7 @@ 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
trap 'error=$?; [ $? = 0 ] || { echo; echo "BLAAR: error $error executing $blaar_program_name $*"; echo; exit $error }; rm -rf "$TMP_DIR"' EXIT INT HUP TERM
echo $(echo "$@"|bc -l)
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