Skip to content

Commit d9a235f

Browse files
committed
Use a distribution-independent readlink invocation [EFForg#1504]
The GNU and BSD versions of readlink assign different meanings to the -f flag. By dropping -f we get a command that works the same on multiple platforms. Conflicts: locate-gnu-utils.sh
1 parent a736517 commit d9a235f

File tree

3 files changed

+5
-30
lines changed

3 files changed

+5
-30
lines changed

install-dev-dependencies.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ if type apt-get >/dev/null ; then
77
firefox chromium-browser zip sqlite3 python-pip libcurl4-openssl-dev
88
elif type brew >/dev/null ; then
99
brew list python &>/dev/null || brew install python
10-
brew list coreutils &>/dev/null || brew install coreutils
1110
brew install libxml2 gnu-sed
1211
if ! echo $PATH | grep -ql /usr/local/bin ; then
1312
echo '/usr/local/bin not found in $PATH, please add it.'

locate-gnu-utils.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

test.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/bin/bash -ex
22
# Run tests for HTTPS Everywhere
33

4-
source locate-gnu-utils.sh
4+
# Get into the project-root. This script may be executed as `test.sh`
5+
# or as .git/hooks/pre-push, so we need to find the directory containing
6+
# test.sh before we can proceed. If $0 is not a symlink, `readlink` will
7+
# print nothing; if it is a symlink it will print the link target.
8+
cd $(dirname $0)/$(dirname $(readlink $0))
59

6-
# We have to change to the right directory because this is sometimes invoked
7-
# through a symlink in .git/hooks/pre-push.
8-
cd $(dirname $("$READLINK" -f $0))
910
source utils/mktemp.sh
1011

1112
# dummy Jetpack addon that contains tests

0 commit comments

Comments
 (0)