diff options
author | ng0 <ng0@n0.is> | 2019-03-09 12:10:10 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-03-09 12:10:10 +0000 |
commit | 5f7119d93f6868a2e21d23b3df066fb43489b9da (patch) | |
tree | b4ed68dfb450563997afd81a2b8e615c8ff63c80 /src | |
parent | 81f6aa39f603bb9a176bdc901566856c4dde8790 (diff) | |
download | gnunet-5f7119d93f6868a2e21d23b3df066fb43489b9da.tar.gz gnunet-5f7119d93f6868a2e21d23b3df066fb43489b9da.zip |
bashism
Diffstat (limited to 'src')
-rwxr-xr-x | src/credential/test_credential_collect.sh | 4 | ||||
-rwxr-xr-x | src/credential/test_credential_collect_rest.sh | 13 | ||||
-rwxr-xr-x | src/credential/test_credential_issue.sh | 4 | ||||
-rwxr-xr-x | src/credential/test_credential_issue_rest.sh | 4 | ||||
-rwxr-xr-x | src/credential/test_credential_verify.sh | 5 | ||||
-rwxr-xr-x | src/credential/test_credential_verify_and.sh | 5 | ||||
-rwxr-xr-x | src/credential/test_credential_verify_rest.sh | 5 | ||||
-rwxr-xr-x | src/credential/test_credential_verify_simple.sh | 4 |
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 |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(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 | ||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 23 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
24 | 24 | ||
25 | TEST_ATTR="test" | 25 | TEST_ATTR="test" |
26 | TEST_ATTR2="test2" | 26 | 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 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(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 | ||
25 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 25 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
26 | gnunet-arm -s -c test_credential_lookup.conf | 26 | gnunet-arm -s -c test_credential_lookup.conf |
27 | gnunet-identity -C service -c test_credential_lookup.conf | 27 | gnunet-identity -C service -c test_credential_lookup.conf |
28 | gnunet-identity -C alice -c test_credential_lookup.conf | 28 | gnunet-identity -C alice -c test_credential_lookup.conf |
@@ -82,9 +82,10 @@ gnunet-arm -e -c test_credential_lookup.conf | |||
82 | echo "Done" | 82 | echo "Done" |
83 | if [ "$RES_CRED" != "Failed." ] | 83 | if [ "$RES_CRED" != "Failed." ] |
84 | then | 84 | then |
85 | echo -e "${RES_CRED}" | 85 | # TODO: replace echo -e bashism. |
86 | exit 0 | 86 | echo -e "${RES_CRED}" |
87 | exit 0 | ||
87 | else | 88 | else |
88 | echo "FAIL: Failed to verify credential $RES_CRED." | 89 | echo "FAIL: Failed to verify credential $RES_CRED." |
89 | exit 1 | 90 | exit 1 |
90 | fi | 91 | 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 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(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 | ||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 23 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
24 | 24 | ||
25 | TEST_ATTR="test" | 25 | TEST_ATTR="test" |
26 | gnunet-arm -s -c test_credential_lookup.conf | 26 | 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 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(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 | ||
23 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 23 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
24 | 24 | ||
25 | TEST_ATTR="test" | 25 | TEST_ATTR="test" |
26 | gnunet-arm -s -c test_credential_lookup.conf | 26 | 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 @@ | |||
1 | #!/bin/bash | 1 | #!/usr/bin/env bash |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(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 | ||
25 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 25 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
26 | gnunet-arm -s -c test_credential_lookup.conf | 26 | gnunet-arm -s -c test_credential_lookup.conf |
27 | gnunet-identity -C service -c test_credential_lookup.conf | 27 | gnunet-identity -C service -c test_credential_lookup.conf |
28 | gnunet-identity -C alice -c test_credential_lookup.conf | 28 | gnunet-identity -C alice -c test_credential_lookup.conf |
@@ -73,6 +73,7 @@ gnunet-arm -e -c test_credential_lookup.conf | |||
73 | 73 | ||
74 | if [ "$RES_CRED" != "Failed." ] | 74 | if [ "$RES_CRED" != "Failed." ] |
75 | then | 75 | then |
76 | # TODO: replace echo -e bashism | ||
76 | echo -e "${RES_CRED}" | 77 | echo -e "${RES_CRED}" |
77 | exit 0 | 78 | exit 0 |
78 | else | 79 | 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 @@ | |||
1 | #!/bin/bash | 1 | #!/usr/bin/env bash |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(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 | ||
25 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 25 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
26 | gnunet-arm -s -c test_credential_lookup.conf | 26 | gnunet-arm -s -c test_credential_lookup.conf |
27 | gnunet-identity -C service -c test_credential_lookup.conf | 27 | gnunet-identity -C service -c test_credential_lookup.conf |
28 | gnunet-identity -C alice -c test_credential_lookup.conf | 28 | gnunet-identity -C alice -c test_credential_lookup.conf |
@@ -73,6 +73,7 @@ gnunet-arm -e -c test_credential_lookup.conf | |||
73 | 73 | ||
74 | if [ "$RES_CRED" != "Failed." ] | 74 | if [ "$RES_CRED" != "Failed." ] |
75 | then | 75 | then |
76 | # TODO: echo -e bashism | ||
76 | echo -e "${RES_CRED}" | 77 | echo -e "${RES_CRED}" |
77 | exit 0 | 78 | exit 0 |
78 | else | 79 | 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 @@ | |||
1 | #!/bin/bash | 1 | #!/usr/bin/env bash |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(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 | ||
25 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 25 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
26 | gnunet-arm -s -c test_credential_lookup.conf | 26 | gnunet-arm -s -c test_credential_lookup.conf |
27 | gnunet-identity -C service -c test_credential_lookup.conf | 27 | gnunet-identity -C service -c test_credential_lookup.conf |
28 | gnunet-identity -C alice -c test_credential_lookup.conf | 28 | gnunet-identity -C alice -c test_credential_lookup.conf |
@@ -79,6 +79,7 @@ gnunet-arm -e -c test_credential_lookup.conf | |||
79 | 79 | ||
80 | if [ "$RES_CRED" != "Failed." ] | 80 | if [ "$RES_CRED" != "Failed." ] |
81 | then | 81 | then |
82 | # TODO: replace echo -e bashism | ||
82 | echo -e "${RES_CRED}" | 83 | echo -e "${RES_CRED}" |
83 | exit 0 | 84 | exit 0 |
84 | else | 85 | 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 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/sh |
2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT | 2 | trap "gnunet-arm -e -c test_credential_lookup.conf" SIGINT |
3 | 3 | ||
4 | LOCATION=$(which gnunet-config) | 4 | LOCATION=$(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 | ||
21 | which timeout &> /dev/null && DO_TIMEOUT="timeout 30" | 21 | which timeout > /dev/null 2>&1 && DO_TIMEOUT="timeout 30" |
22 | gnunet-arm -s -c test_credential_lookup.conf | 22 | gnunet-arm -s -c test_credential_lookup.conf |
23 | gnunet-identity -C testissuer -c test_credential_lookup.conf | 23 | gnunet-identity -C testissuer -c test_credential_lookup.conf |
24 | gnunet-identity -C testsubject -c test_credential_lookup.conf | 24 | gnunet-identity -C testsubject -c test_credential_lookup.conf |