From cd3dbd55877c89e848121a2dd97db924b87e3ffe Mon Sep 17 00:00:00 2001
From: Mario <mario@osaka.com>
Date: Tue, 23 Mar 2021 16:35:30 +0900
Subject: [PATCH] WIP. minor improvement

---
 scanLauncher.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scanLauncher.sh b/scanLauncher.sh
index 482fcfa..452b363 100755
--- a/scanLauncher.sh
+++ b/scanLauncher.sh
@@ -153,11 +153,14 @@ max_reps=$(jq -j '.common_config.max_trials_in_case_of_failure' $SCANCFG)
 START_YR=$(date +%s.%N)
 
 reps=0; retval=-1
-while [ retval != 0 ]; do
+while [ true ]; do
     ((reps++))
 
     $comm   # call Yarr
     retval=$?
+    if [ $retval -eq 0 ]; then
+        break
+    fi
 
     if [ $retval -ne 0 ] && [ $reps -ge $max_reps ]; then 
         echo "[ warn ][sl] After $max_reps attempts, couldn't succesfully finish $scanName."
-- 
GitLab