bashism
authorng0 <ng0@n0.is>
Sat, 9 Mar 2019 12:10:10 +0000 (12:10 +0000)
committerng0 <ng0@n0.is>
Sat, 9 Mar 2019 12:10:10 +0000 (12:10 +0000)
src/credential/test_credential_collect.sh
src/credential/test_credential_collect_rest.sh
src/credential/test_credential_issue.sh
src/credential/test_credential_issue_rest.sh
src/credential/test_credential_verify.sh
src/credential/test_credential_verify_and.sh
src/credential/test_credential_verify_rest.sh
src/credential/test_credential_verify_simple.sh

index 6c713063f5c4cdf3bc1c044d120c69f95d7a6e46..0ae063eda26382b7663c3bb08e9a1aa9158e63f5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
 
 LOCATION=$(which gnunet-config)
@@ -20,7 +20,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
 #  (3) PKEY3.user -> PKEY4
 
 
-which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
 
 TEST_ATTR="test"
 TEST_ATTR2="test2"
index 0b31f85bc228878462ce80ebce0f242b29ee8830..fe59d9399500641570891405c5d49a09b1716300 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
 
 LOCATION=$(which gnunet-config)
@@ -22,7 +22,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
 #  (5) GNUnet.developer -> Alice
 
 
-which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
 gnunet-arm -s -c test_credential_lookup.conf
 gnunet-identity -C service -c test_credential_lookup.conf
 gnunet-identity -C alice -c test_credential_lookup.conf
@@ -82,9 +82,10 @@ gnunet-arm -e -c test_credential_lookup.conf
 echo "Done"
 if [ "$RES_CRED" != "Failed." ]
 then
-  echo -e "${RES_CRED}"
-  exit 0
+    # TODO: replace echo -e bashism.
+    echo -e "${RES_CRED}"
+    exit 0
 else
-  echo "FAIL: Failed to verify credential $RES_CRED."
-  exit 1
+    echo "FAIL: Failed to verify credential $RES_CRED."
+    exit 1
 fi
index 158d91c5b024b1b52c7ee8154ad790d3c647a9bf..f06de5d42bb8c701e15ade1c889ed2001f3f45d3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
 
 LOCATION=$(which gnunet-config)
@@ -20,7 +20,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
 #  (3) PKEY3.user -> PKEY4
 
 
-which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
 
 TEST_ATTR="test"
 gnunet-arm -s -c test_credential_lookup.conf
index 15cd55083ef6c29bef0f45b11a516fb5636f98a1..c518c08ecaa94708773559cf563dafb9657bfa7d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
 
 LOCATION=$(which gnunet-config)
@@ -20,7 +20,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
 #  (3) PKEY3.user -> PKEY4
 
 
-which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
 
 TEST_ATTR="test"
 gnunet-arm -s -c test_credential_lookup.conf
index d042bcfe6f0ee5abdb6c68202be417359ea38399..49d4d4afb4ee8a2a8e97ec3462076835d6002d48 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
 
 LOCATION=$(which gnunet-config)
@@ -22,7 +22,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
 #  (5) GNUnet.developer -> Alice
 
 
-which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
 gnunet-arm -s -c test_credential_lookup.conf
 gnunet-identity -C service -c test_credential_lookup.conf
 gnunet-identity -C alice -c test_credential_lookup.conf
@@ -73,6 +73,7 @@ gnunet-arm -e -c test_credential_lookup.conf
 
 if [ "$RES_CRED" != "Failed." ]
 then
+  # TODO: replace echo -e bashism
   echo -e "${RES_CRED}"
   exit 0
 else
index 9d5c1962e95cbcb01065aa16aded5d9479151176..7e8dc139296cdf737b9a42391a92f9bccea1abd5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
 
 LOCATION=$(which gnunet-config)
@@ -22,7 +22,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
 #  (5) GNUnet.developer -> Alice
 
 
-which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
 gnunet-arm -s -c test_credential_lookup.conf
 gnunet-identity -C service -c test_credential_lookup.conf
 gnunet-identity -C alice -c test_credential_lookup.conf
@@ -73,6 +73,7 @@ gnunet-arm -e -c test_credential_lookup.conf
 
 if [ "$RES_CRED" != "Failed." ]
 then
+  # TODO: echo -e bashism
   echo -e "${RES_CRED}"
   exit 0
 else
index 6133ea25efc9326add1674f25588ee4a9293434a..99db5da8a7e4df4edb33f5e0695ada386d491f80 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
 trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
 
 LOCATION=$(which gnunet-config)
@@ -22,7 +22,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
 #  (5) GNUnet.developer -> Alice
 
 
-which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
 gnunet-arm -s -c test_credential_lookup.conf
 gnunet-identity -C service -c test_credential_lookup.conf
 gnunet-identity -C alice -c test_credential_lookup.conf
@@ -79,6 +79,7 @@ gnunet-arm -e -c test_credential_lookup.conf
 
 if [ "$RES_CRED" != "Failed." ]
 then
+  # TODO: replace echo -e bashism
   echo -e "${RES_CRED}"
   exit 0
 else
index bcb3f9877babd823e18252c550cdd78566a7b367..41afb47b045bdd29b705c29dbc895dc1a7c430e7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
 
 LOCATION=$(which gnunet-config)
@@ -18,7 +18,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
 #  (3) Isser.user -> Subject
 
 
-which timeout &> /dev/null && DO_TIMEOUT="timeout 30"
+which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
 gnunet-arm -s -c test_credential_lookup.conf
 gnunet-identity -C testissuer -c test_credential_lookup.conf
 gnunet-identity -C testsubject -c test_credential_lookup.conf