aboutsummaryrefslogtreecommitdiff
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
parent81f6aa39f603bb9a176bdc901566856c4dde8790 (diff)
downloadgnunet-5f7119d93f6868a2e21d23b3df066fb43489b9da.tar.gz
gnunet-5f7119d93f6868a2e21d23b3df066fb43489b9da.zip
bashism
-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 @@
1#!/bin/bash 1#!/bin/sh
2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT 2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
3 3
4LOCATION=$(which gnunet-config) 4LOCATION=$(which gnunet-config)
@@ -20,7 +20,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
20# (3) PKEY3.user -> PKEY4 20# (3) PKEY3.user -> PKEY4
21 21
22 22
23which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 23which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
24 24
25TEST_ATTR="test" 25TEST_ATTR="test"
26TEST_ATTR2="test2" 26TEST_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 @@
1#!/bin/bash 1#!/bin/sh
2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT 2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
3 3
4LOCATION=$(which gnunet-config) 4LOCATION=$(which gnunet-config)
@@ -22,7 +22,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
22# (5) GNUnet.developer -> Alice 22# (5) GNUnet.developer -> Alice
23 23
24 24
25which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 25which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
26gnunet-arm -s -c test_credential_lookup.conf 26gnunet-arm -s -c test_credential_lookup.conf
27gnunet-identity -C service -c test_credential_lookup.conf 27gnunet-identity -C service -c test_credential_lookup.conf
28gnunet-identity -C alice -c test_credential_lookup.conf 28gnunet-identity -C alice -c test_credential_lookup.conf
@@ -82,9 +82,10 @@ gnunet-arm -e -c test_credential_lookup.conf
82echo "Done" 82echo "Done"
83if [ "$RES_CRED" != "Failed." ] 83if [ "$RES_CRED" != "Failed." ]
84then 84then
85 echo -e "${RES_CRED}" 85 # TODO: replace echo -e bashism.
86 exit 0 86 echo -e "${RES_CRED}"
87 exit 0
87else 88else
88 echo "FAIL: Failed to verify credential $RES_CRED." 89 echo "FAIL: Failed to verify credential $RES_CRED."
89 exit 1 90 exit 1
90fi 91fi
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 @@
1#!/bin/bash 1#!/bin/sh
2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT 2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
3 3
4LOCATION=$(which gnunet-config) 4LOCATION=$(which gnunet-config)
@@ -20,7 +20,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
20# (3) PKEY3.user -> PKEY4 20# (3) PKEY3.user -> PKEY4
21 21
22 22
23which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 23which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
24 24
25TEST_ATTR="test" 25TEST_ATTR="test"
26gnunet-arm -s -c test_credential_lookup.conf 26gnunet-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 @@
1#!/bin/bash 1#!/bin/sh
2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT 2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
3 3
4LOCATION=$(which gnunet-config) 4LOCATION=$(which gnunet-config)
@@ -20,7 +20,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
20# (3) PKEY3.user -> PKEY4 20# (3) PKEY3.user -> PKEY4
21 21
22 22
23which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 23which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
24 24
25TEST_ATTR="test" 25TEST_ATTR="test"
26gnunet-arm -s -c test_credential_lookup.conf 26gnunet-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 @@
1#!/bin/bash 1#!/usr/bin/env bash
2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT 2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
3 3
4LOCATION=$(which gnunet-config) 4LOCATION=$(which gnunet-config)
@@ -22,7 +22,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
22# (5) GNUnet.developer -> Alice 22# (5) GNUnet.developer -> Alice
23 23
24 24
25which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 25which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
26gnunet-arm -s -c test_credential_lookup.conf 26gnunet-arm -s -c test_credential_lookup.conf
27gnunet-identity -C service -c test_credential_lookup.conf 27gnunet-identity -C service -c test_credential_lookup.conf
28gnunet-identity -C alice -c test_credential_lookup.conf 28gnunet-identity -C alice -c test_credential_lookup.conf
@@ -73,6 +73,7 @@ gnunet-arm -e -c test_credential_lookup.conf
73 73
74if [ "$RES_CRED" != "Failed." ] 74if [ "$RES_CRED" != "Failed." ]
75then 75then
76 # TODO: replace echo -e bashism
76 echo -e "${RES_CRED}" 77 echo -e "${RES_CRED}"
77 exit 0 78 exit 0
78else 79else
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 @@
1#!/bin/bash 1#!/usr/bin/env bash
2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT 2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
3 3
4LOCATION=$(which gnunet-config) 4LOCATION=$(which gnunet-config)
@@ -22,7 +22,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
22# (5) GNUnet.developer -> Alice 22# (5) GNUnet.developer -> Alice
23 23
24 24
25which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 25which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
26gnunet-arm -s -c test_credential_lookup.conf 26gnunet-arm -s -c test_credential_lookup.conf
27gnunet-identity -C service -c test_credential_lookup.conf 27gnunet-identity -C service -c test_credential_lookup.conf
28gnunet-identity -C alice -c test_credential_lookup.conf 28gnunet-identity -C alice -c test_credential_lookup.conf
@@ -73,6 +73,7 @@ gnunet-arm -e -c test_credential_lookup.conf
73 73
74if [ "$RES_CRED" != "Failed." ] 74if [ "$RES_CRED" != "Failed." ]
75then 75then
76 # TODO: echo -e bashism
76 echo -e "${RES_CRED}" 77 echo -e "${RES_CRED}"
77 exit 0 78 exit 0
78else 79else
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 @@
1#!/bin/bash 1#!/usr/bin/env bash
2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT 2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
3 3
4LOCATION=$(which gnunet-config) 4LOCATION=$(which gnunet-config)
@@ -22,7 +22,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
22# (5) GNUnet.developer -> Alice 22# (5) GNUnet.developer -> Alice
23 23
24 24
25which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 25which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
26gnunet-arm -s -c test_credential_lookup.conf 26gnunet-arm -s -c test_credential_lookup.conf
27gnunet-identity -C service -c test_credential_lookup.conf 27gnunet-identity -C service -c test_credential_lookup.conf
28gnunet-identity -C alice -c test_credential_lookup.conf 28gnunet-identity -C alice -c test_credential_lookup.conf
@@ -79,6 +79,7 @@ gnunet-arm -e -c test_credential_lookup.conf
79 79
80if [ "$RES_CRED" != "Failed." ] 80if [ "$RES_CRED" != "Failed." ]
81then 81then
82 # TODO: replace echo -e bashism
82 echo -e "${RES_CRED}" 83 echo -e "${RES_CRED}"
83 exit 0 84 exit 0
84else 85else
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 @@
1#!/bin/bash 1#!/bin/sh
2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT 2trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT
3 3
4LOCATION=$(which gnunet-config) 4LOCATION=$(which gnunet-config)
@@ -18,7 +18,7 @@ rm -rf `gnunet-config -c test_credential_lookup.conf -s PATHS -o GNUNET_HOME -f`
18# (3) Isser.user -> Subject 18# (3) Isser.user -> Subject
19 19
20 20
21which timeout &> /dev/null && DO_TIMEOUT="timeout 30" 21which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30"
22gnunet-arm -s -c test_credential_lookup.conf 22gnunet-arm -s -c test_credential_lookup.conf
23gnunet-identity -C testissuer -c test_credential_lookup.conf 23gnunet-identity -C testissuer -c test_credential_lookup.conf
24gnunet-identity -C testsubject -c test_credential_lookup.conf 24gnunet-identity -C testsubject -c test_credential_lookup.conf