summaryrefslogtreecommitdiff
path: root/src/credential
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-03-09 12:10:10 +0000
committerng0 <ng0@n0.is>2019-03-09 12:10:10 +0000
commit5f7119d93f6868a2e21d23b3df066fb43489b9da (patch)
treeb4ed68dfb450563997afd81a2b8e615c8ff63c80 /src/credential
parent81f6aa39f603bb9a176bdc901566856c4dde8790 (diff)
bashism
Diffstat (limited to 'src/credential')
-rwxr-xr-xsrc/credential/test_credential_collect.sh4
-rwxr-xr-xsrc/credential/test_credential_collect_rest.sh13
-rwxr-xr-xsrc/credential/test_credential_issue.sh4
-rwxr-xr-xsrc/credential/test_credential_issue_rest.sh4
-rwxr-xr-xsrc/credential/test_credential_verify.sh5
-rwxr-xr-xsrc/credential/test_credential_verify_and.sh5
-rwxr-xr-xsrc/credential/test_credential_verify_rest.sh5
-rwxr-xr-xsrc/credential/test_credential_verify_simple.sh4
8 files changed, 24 insertions, 20 deletions
diff --git a/src/credential/test_credential_collect.sh b/src/credential/test_credential_collect.sh
index 6c713063f..0ae063eda 100755
--- a/src/credential/test_credential_collect.sh
+++ b/src/credential/test_credential_collect.sh
@@ -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"
diff --git a/src/credential/test_credential_collect_rest.sh b/src/credential/test_credential_collect_rest.sh
index 0b31f85bc..fe59d9399 100755
--- a/src/credential/test_credential_collect_rest.sh
+++ b/src/credential/test_credential_collect_rest.sh
@@ -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
diff --git a/src/credential/test_credential_issue.sh b/src/credential/test_credential_issue.sh
index 158d91c5b..f06de5d42 100755
--- a/src/credential/test_credential_issue.sh
+++ b/src/credential/test_credential_issue.sh
@@ -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
diff --git a/src/credential/test_credential_issue_rest.sh b/src/credential/test_credential_issue_rest.sh
index 15cd55083..c518c08ec 100755
--- a/src/credential/test_credential_issue_rest.sh
+++ b/src/credential/test_credential_issue_rest.sh
@@ -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
diff --git a/src/credential/test_credential_verify.sh b/src/credential/test_credential_verify.sh
index d042bcfe6..49d4d4afb 100755
--- a/src/credential/test_credential_verify.sh
+++ b/src/credential/test_credential_verify.sh
@@ -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
diff --git a/src/credential/test_credential_verify_and.sh b/src/credential/test_credential_verify_and.sh
index 9d5c1962e..7e8dc1392 100755
--- a/src/credential/test_credential_verify_and.sh
+++ b/src/credential/test_credential_verify_and.sh
@@ -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
diff --git a/src/credential/test_credential_verify_rest.sh b/src/credential/test_credential_verify_rest.sh
index 6133ea25e..99db5da8a 100755
--- a/src/credential/test_credential_verify_rest.sh
+++ b/src/credential/test_credential_verify_rest.sh
@@ -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
diff --git a/src/credential/test_credential_verify_simple.sh b/src/credential/test_credential_verify_simple.sh
index bcb3f9877..41afb47b0 100755
--- a/src/credential/test_credential_verify_simple.sh
+++ b/src/credential/test_credential_verify_simple.sh
@@ -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