diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gns/gnunet-gns-proxy-setup-ca.in | 60 | ||||
-rwxr-xr-x | src/gns/test_gnunet_gns.sh.in | 9 |
2 files changed, 39 insertions, 30 deletions
diff --git a/src/gns/gnunet-gns-proxy-setup-ca.in b/src/gns/gnunet-gns-proxy-setup-ca.in index 9a298f24a..b3ebfd11d 100644 --- a/src/gns/gnunet-gns-proxy-setup-ca.in +++ b/src/gns/gnunet-gns-proxy-setup-ca.in | |||
@@ -48,33 +48,45 @@ | |||
48 | 48 | ||
49 | dir=$(dirname "$0") | 49 | dir=$(dirname "$0") |
50 | 50 | ||
51 | if test -e @PKGDATADIRECTORY@/progname.sh | 51 | progname=${0##*/} |
52 | then | ||
53 | . @PKGDATADIRECTORY@/progname.sh | ||
54 | else | ||
55 | . $dir/../../contrib/build-common/sh/lib.sh/progname.sh | ||
56 | fi | ||
57 | 52 | ||
58 | if test -e @PKGDATADIRECTORY@/existence.sh | 53 | existence() { |
59 | then | 54 | command -v "$1" >/dev/null 2>&1 |
60 | . @PKGDATADIRECTORY@/existence.sh | 55 | } |
61 | else | 56 | |
62 | . $dir/../../contrib/build-common/sh/lib.sh/existence.sh | 57 | statusmsg() |
63 | fi | 58 | { |
59 | ${runcmd} echo "${tab}$@" | tee -a "${results}" | ||
60 | } | ||
61 | |||
62 | infomsg() | ||
63 | { | ||
64 | if [ x$verbosity = x1 ]; then | ||
65 | statusmsg "INFO:${tab}$@" | ||
66 | fi | ||
67 | } | ||
64 | 68 | ||
65 | if test -e @PKGDATADIRECTORY@/msg.sh | 69 | warningmsg() |
66 | then | 70 | { |
67 | . @PKGDATADIRECTORY@/msg.sh | 71 | statusmsg "WARNING:${tab}$@" |
68 | else | 72 | } |
69 | . $dir/../../contrib/build-common/sh/lib.sh/msg.sh | ||
70 | fi | ||
71 | 73 | ||
72 | if test -e @PKGDATADIRECTORY@/version_gnunet.sh | 74 | errormsg() |
73 | then | 75 | { |
74 | . @PKGDATADIRECTORY@/version_gnunet.sh | 76 | statusmsg "ERROR:${tab}$@" |
75 | else | 77 | } |
76 | . $dir/../../contrib/build-common/sh/lib.sh/version_gnunet.sh | 78 | |
77 | fi | 79 | linemsg() |
80 | { | ||
81 | statusmsg "=========================================" | ||
82 | } | ||
83 | |||
84 | |||
85 | print_version() | ||
86 | { | ||
87 | GNUNET_ARM_VERSION=`gnunet-arm -v | awk '{print $2 " " $3}'` | ||
88 | echo ${progname} $GNUNET_ARM_VERSION | ||
89 | } | ||
78 | 90 | ||
79 | # Whitespace normalization without depending on shell features: | 91 | # Whitespace normalization without depending on shell features: |
80 | tab=' ' | 92 | tab=' ' |
diff --git a/src/gns/test_gnunet_gns.sh.in b/src/gns/test_gnunet_gns.sh.in index 8a96ff034..d0c07b4e4 100755 --- a/src/gns/test_gnunet_gns.sh.in +++ b/src/gns/test_gnunet_gns.sh.in | |||
@@ -8,12 +8,9 @@ | |||
8 | # but this works for now. | 8 | # but this works for now. |
9 | dir=$(dirname "$0") | 9 | dir=$(dirname "$0") |
10 | 10 | ||
11 | if test -e @PKGDATADIRECTORY@/existence.sh | 11 | existence() { |
12 | then | 12 | command -v "$1" >/dev/null 2>&1 |
13 | . @PKGDATADIRECTORY@/existence.sh | 13 | } |
14 | else | ||
15 | . $dir/../../contrib/build-common/sh/lib.sh/existence.sh | ||
16 | fi | ||
17 | 14 | ||
18 | LOCATION=`existence gnunet-config` | 15 | LOCATION=`existence gnunet-config` |
19 | if test -z $LOCATION; then | 16 | if test -z $LOCATION; then |