Commit 3ded9ec6afcbcf6475050c5be72df0434ee8d305
1 parent
86ba2eb9
Exists in
r5_design
and in
1 other branch
Drop usage of `readlink -f`
Not portable to *BSD
Showing
3 changed files
with
9 additions
and
4 deletions
Show diff stats
server
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | -ROOTDIR="$(readlink -f $(dirname $0))" | ||
4 | -. $ROOTDIR/test/ip_helper.sh | 3 | +if [ -f test/ip_helper.sh ]; then |
4 | + ROOTDIR=$(dirname $0) | ||
5 | + . test/ip_helper.sh | ||
6 | +else | ||
7 | + echo "E: must run $0 from the root of the repository!" | ||
8 | + exit 1 | ||
9 | +fi | ||
5 | 10 | ||
6 | sudo -v | 11 | sudo -v |
7 | sudo redir --lport 80 --cport 80 --caddr $reverseproxy & | 12 | sudo redir --lport 80 --cport 80 --caddr $reverseproxy & |
test/bin/curl
@@ -5,7 +5,7 @@ set -e | @@ -5,7 +5,7 @@ set -e | ||
5 | unset http_proxy | 5 | unset http_proxy |
6 | unset https_proxy | 6 | unset https_proxy |
7 | 7 | ||
8 | -ROOTDIR=$(readlink -f $(dirname $0)/../..) | 8 | +ROOTDIR=$(dirname $0)/../.. |
9 | . $(dirname $0)/../ip_helper.sh | 9 | . $(dirname $0)/../ip_helper.sh |
10 | 10 | ||
11 | /usr/bin/curl \ | 11 | /usr/bin/curl \ |