Commit b36249e7 authored by Arnaud Blanchard's avatar Arnaud Blanchard

Add XXX in mktemp in blaar.sh to make it works like in OSX

parent afb5de06
#!/usr/bin/env bash #Use your $PATH to find bash
#!/usr/bin/env bash
# Basic Libraries And Applications for Robotics (BLAAR)
# Copyright ETIS — ENSEA, University of Cergy-Pontoise, CNRS (2011 - 2017)
......@@ -20,8 +20,7 @@ set -o pipefail #Error if a pipe fail
blaar_program_name=$(basename $0)
#Create a temporary directory, essencially for logs
TMP_DIR=/tmp/blaar/$blaar_program_name$$
mkdir -p $TMP_DIR
TMP_DIR="$(mktemp -d -t ${blaar_program_name}XXX)"
trap 'error=$?; rm -rf "$TMP_DIR"; [ $error = 0 ] || { echo; echo "BLAAR: error $error executing $blaar_program_name $*"; echo; exit $error; }' EXIT INT HUP TERM ABRT
calc(){
......
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