Support TMP_DIR from caller.
authorDennis Schafroth <dennis@indexdata.com>
Tue, 29 May 2012 09:28:24 +0000 (11:28 +0200)
committerDennis Schafroth <dennis@indexdata.com>
Tue, 29 May 2012 09:28:24 +0000 (11:28 +0200)
perf/bash/par_fixed_clients.sh

index 04d8524..a441589 100755 (executable)
@@ -12,8 +12,10 @@ PORT=$2
 SERVICE=$3
 CLIENT_SCRIPT="client_timed.sh"
 rm -f *.time
-export TMP_DIR=run_`date +"%Y%m%d_%H%M%S"`/
-mkdir ${TMP_DIR}
+if [ "$TMP_DIR" == "" ] ; then  
+    export TMP_DIR=run_`date +"%Y%m%d_%H%M%S"`/
+fi  
+mkdir -p ${TMP_DIR} 
 rm -f latest
 ln -s ${TMP_DIR} latest
 while test $r -lt $ROUNDS; do