forked from EFForg/https-everywhere
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchromium.sh
More file actions
executable file
·32 lines (28 loc) · 807 Bytes
/
chromium.sh
File metadata and controls
executable file
·32 lines (28 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash -ex
# Run Chromium tests for HTTPS Everywhere
# Get to the repo root directory, even when we're symlinked as a hook.
if [ -n "$GIT_DIR" ]
then
# $GIT_DIR is set, so we're running as a hook.
cd $GIT_DIR
else
# Git command exists? Cool, let's CD to the right place.
git rev-parse && cd "$(git rev-parse --show-toplevel)"
fi
# If you just want to run Chromium with the latest code:
if [ "$1" == "--justrun" ]; then
shift
./makecrx.sh
echo "running Chromium"
source utils/mktemp.sh
PROFILE_DIRECTORY="$(mktemp -d)"
trap 'rm -r "$PROFILE_DIRECTORY"' EXIT
chromium-browser \
--user-data-dir="$PROFILE_DIRECTORY" \
--load-extension=pkg/crx/
else
./makecrx.sh
echo "running tests"
CRX_NAME="`ls -tr pkg/*.crx | tail -1`"
python2.7 test/chromium/script.py $CRX_NAME
fi