]> matita.cs.unibo.it Git - fireball-separation.git/blobdiff - ocaml/run
Fixed if-then-else
[fireball-separation.git] / ocaml / run
index 7a6436d411a8932935b9d81041079d41647734c9..77957cdc081974d77ae49d47e8a3614ff557065a 100644 (file)
--- a/ocaml/run
+++ b/ocaml/run
@@ -8,15 +8,16 @@ echo
 
 trap 'echo' SIGINT
 
-if ( ./test4.out 2>&1 | tee $file | stdbuf -o0 grep -Po '(?<=measure=)[^ ]*' | stdbuf -o0 tr '\n' ' ')
-then {
+
+./test4.out 2>&1 | tee $file | stdbuf -o0 grep -Po '(?<=measure=)[^ ]*' | stdbuf -o0 tr '\n' ' '
+
+if [ $? -eq 0 ]
+then
  rm $file
  echo
  echo 'Test succeeded'
-}
-else {
+else
  echo ''
  echo 'Test failed or interrupted'
  echo "Please have a look at log file: $file ."
-}
 fi