From 2278bce02aceff82e199c1eaec1dc4dc6c0af6dd Mon Sep 17 00:00:00 2001
From: Romain Boman <romain.boman@gmail.com>
Date: Fri, 4 Mar 2022 11:04:28 +0100
Subject: [PATCH] fix undefined variables

---
 cfg/loop.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cfg/loop.sh b/cfg/loop.sh
index e3b00ca..18b0d4f 100755
--- a/cfg/loop.sh
+++ b/cfg/loop.sh
@@ -52,6 +52,7 @@ function fct_loop()
 {
     umask 007
 
+    verb=
     #verb=1  #uncomment to debug script
 
     if [ -n "$verb" ] ; then
@@ -64,6 +65,8 @@ function fct_loop()
     #	echo "var=$var"
     #done
     
+    thisdir="$HOME/bin/cfg"
+
     if [ "x$2" != "x" ] && [ -d "$thisdir/$2" ]; then
         myhost=$2
     else
@@ -71,8 +74,6 @@ function fct_loop()
     fi
     #echo "myhost=" $myhost
     
-    thisdir="$HOME/bin/cfg"
-    
     # default cfg
     
     for i in $thisdir/default/*.$1 ; do
-- 
GitLab