gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] 01/02: shellcheck fixes


From: gnunet
Subject: [taler-exchange] 01/02: shellcheck fixes
Date: Wed, 23 Aug 2023 10:29:33 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

commit fc461d11a86bd33ca70259b85a4aa7d6875e12c9
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Aug 23 09:32:51 2023 +0200

    shellcheck fixes
---
 src/bank-lib/test_bank.sh | 37 +++++++++++++++++++++++++++----------
 1 file changed, 27 insertions(+), 10 deletions(-)

diff --git a/src/bank-lib/test_bank.sh b/src/bank-lib/test_bank.sh
index 7d72497e..686f78dd 100755
--- a/src/bank-lib/test_bank.sh
+++ b/src/bank-lib/test_bank.sh
@@ -1,20 +1,20 @@
 #!/bin/bash
 # This file is in the public domain.
-
+# shellcheck disable=SC2317
 set -eu
 
 # Exit, with status code "skip" (no 'real' failure)
 function exit_skip() {
-    echo $1
+    echo "$1"
     exit 77
 }
 
 # Cleanup to run whenever we exit
 function cleanup()
 {
-    for n in `jobs -p`
+    for n in $(jobs -p)
     do
-        kill $n 2> /dev/null || true
+        kill "$n" 2> /dev/null || true
     done
     wait
 }
@@ -24,21 +24,30 @@ trap cleanup EXIT
 
 echo -n "Launching bank..."
 
-taler-fakebank-run -c test_bank.conf -L DEBUG &> bank.log &
+taler-fakebank-run \
+    -c test_bank.conf \
+    -L DEBUG &> bank.log &
 
 # Wait for bank to be available (usually the slowest)
-for n in `seq 1 50`
+for n in $(seq 1 50)
 do
     echo -n "."
     sleep 0.2
     OK=0
     # bank
-    wget --tries=1 --timeout=1 http://localhost:8899/ -o /dev/null -O 
/dev/null >/dev/null || continue
+    wget \
+        --tries=1 \
+        --timeout=1 \
+        http://localhost:8899/ \
+        -o /dev/null \
+        -O /dev/null \
+        >/dev/null \
+        || continue
     OK=1
     break
 done
 
-if [ 1 != $OK ]
+if [ 1 != "$OK" ]
 then
     exit_skip "Failed to launch services (bank)"
 fi
@@ -56,7 +65,11 @@ echo " OK"
 
 echo -n "Requesting exchange incoming transaction list ..."
 
-./taler-exchange-wire-gateway-client -b http://localhost:8899/exchange/ -i | 
grep TESTKUDOS:4 > /dev/null
+./taler-exchange-wire-gateway-client \
+    -b http://localhost:8899/exchange/ \
+    -i \
+    | grep TESTKUDOS:4 \
+    > /dev/null
 
 echo " OK"
 
@@ -73,7 +86,11 @@ echo " OK"
 
 echo -n "Requesting exchange's outgoing transaction list..."
 
-./taler-exchange-wire-gateway-client -b http://localhost:8899/exchange/ -o | 
grep TESTKUDOS:2 > /dev/null
+./taler-exchange-wire-gateway-client \
+    -b http://localhost:8899/exchange/ \
+    -o \
+    | grep TESTKUDOS:2 \
+    > /dev/null
 
 echo " OK"
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]