create symlink logs/run and logs/trace
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 21 Sep 2011 13:28:24 +0000 (15:28 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 21 Sep 2011 13:28:24 +0000 (15:28 +0200)
system/run_log

index 0c6a88c..505d7bc 100755 (executable)
@@ -2,13 +2,17 @@
 cd $(dirname $0)
 mkdir -p logs
 time=$(date +%H-%M)
-logfile=logs/run-${time}.log
-tracefile=logs/trace-${time}.txt
+runfile=run-${time}.txt
+runlast=run
+tracefile=trace-${time}.txt
+tracelast=trace
 
 # figure if TestMain succeeds, as the retcod gets lost in the pipe
 rm -f logs/success
-python -u TestMain.py -t $tracefile "$@" &> $logfile && touch logs/success
-cat $logfile
+rm -f logs/$runlast; (cd logs; ln -s $runfile $runlast)
+rm -f logs/$tracelast; (cd logs; ln -s $tracefile $tracelast)
+python -u TestMain.py -t $tracefile "$@" &> logs/$runfile && touch logs/success
+cat $runfile
 
 if [ -f logs/success ] ; then
     exit 0