File tree Expand file tree Collapse file tree 5 files changed +42
-4
lines changed
Expand file tree Collapse file tree 5 files changed +42
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ if type apt-get >/dev/null ; then
77 firefox chromium-browser zip sqlite3 python-pip libcurl4-openssl-dev
88elif type brew > /dev/null ; then
99 brew list python & > /dev/null || brew install python
10+ brew list coreutils & > /dev/null || brew install coreutils
1011 brew install libxml2 gnu-sed
1112 if ! echo $PATH | grep -ql /usr/local/bin ; then
1213 echo ' /usr/local/bin not found in $PATH, please add it.'
Original file line number Diff line number Diff line change 1+ #! /bin/bash -ex
2+
3+ # BSD readlink and mktemp have different APIs from their GNU counterparts. On
4+ # OSX systems we'll have g-prefixed GNU versions installed by Homebrew. Real
5+ # BSD systems are still left in the cold.
6+
7+ READLINK=$( which readlink 2> /dev/null)
8+ GREADLINK=$( which greadlink 2> /dev/null)
9+ if [ -x " $GREADLINK " ]; then
10+ READLINK=" $GREADLINK "
11+ fi
12+
13+ MKTEMP=$( which mktemp 2> /dev/null)
14+ GMKTEMP=$( which gmktemp 2> /dev/null)
15+ if [ -x " $GMKTEMP " ]; then
16+ MKTEMP=" $GMKTEMP "
17+ fi
18+
19+ check_for_gnu_version () {
20+ gnu_available=$( " $1 " --version 2>&1 | grep GNU)
21+ if [ ! " $gnu_available " ]; then
22+ echo " Could not locate a GNU version of ${2} . This may mean you're using " \
23+ " a non-OSX BSD system, which these scripts don't know how to handle. "
24+ echo " If you are indeed using OSX, something may have gone wrong running " \
25+ " install-dev-dependencies.sh. Look for errors related to coreutils."
26+ exit 1
27+ fi
28+ }
29+
30+ check_for_gnu_version " $MKTEMP " " mktemp"
31+ check_for_gnu_version " $READLINK " " readlink"
Original file line number Diff line number Diff line change 33# Build the extension and run a chromium extension with it installed.
44#
55set -o errexit -o xtrace
6+
67cd $( dirname $0 )
8+ source locate-gnu-utils.sh
79source makecrx.sh
8- PROFILE_DIRECTORY=" $( mktemp -d) "
10+ PROFILE_DIRECTORY=" $( " $MKTEMP " -d) "
911trap ' rm -r "$PROFILE_DIRECTORY"' EXIT
1012chromium-browser \
1113 --user-data-dir=" $PROFILE_DIRECTORY " \
Original file line number Diff line number Diff line change 33# Test that all rulesets modified after a certain date have sufficient test
44# coverage, according to the ruleset checker.
55#
6+
67cd $( dirname $0 )
7- TMP=` mktemp`
8+ source locate-gnu-utils.sh
9+ TMP=` " $MKTEMP " `
810trap ' rm "$TMP"' EXIT
911if ! [ -d https-everywhere-checker ] ; then
1012 echo " Submodule https-everywhere-checker is missing. Run"
Original file line number Diff line number Diff line change 11#! /bin/bash -ex
22# Run tests for HTTPS Everywhere
33
4+ source locate-gnu-utils.sh
5+
46# We have to change to the right directory because this is sometimes invoked
57# through a symlink in .git/hooks/pre-push.
6- cd $( dirname $( readlink -f $0 ) )
8+ cd $( dirname $( " $READLINK " -f $0 ) )
79
810# dummy Jetpack addon that contains tests
911TEST_ADDON_PATH=./https-everywhere-tests/
1012
1113# We'll create a Firefox profile here and install HTTPS Everywhere into it.
12- PROFILE_DIRECTORY=" $( mktemp -d) "
14+ PROFILE_DIRECTORY=" $( " $MKTEMP " -d) "
1315trap ' rm -r "$PROFILE_DIRECTORY"' EXIT
1416HTTPSE_INSTALL_DIRECTORY=$PROFILE_DIRECTORY /extensions/https-everywhere@eff.org
1517
You can’t perform that action at this time.
0 commit comments