Skip to content

Commit b4c1b8c

Browse files
committed
Update build script with new paths and browser options, update readme
1 parent 4008fa7 commit b4c1b8c

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ docker rm snow_test; docker run --name snow_test -p 8080:8080 -it -v ${SNOWFLAK
2525

2626
### Building snowflake inside the Docker container
2727
Inside the snowbox container, execute ```build``` to build and run each component of snowflake.
28+
```
29+
$ build [ -b | --build ] [ -c | --client ] [--chromium | --gecko ]
30+
```
2831

2932
### Attaching additional terminals to the test environment
3033
Open a new terminal and execute ```./snowbox_run --attach```. Excluding the --attach argument will prompt the script to attempt an attachment if the container is already running.

script.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
build=0
55
client=0
6+
browser="chromium"
67

78
while :; do
89
case $1 in
@@ -12,6 +13,12 @@ while :; do
1213
-c|-\?|--client)
1314
client=1
1415
;;
16+
--gecko)
17+
browser="gecko"
18+
;;
19+
--chromium)
20+
browser="chromium"
21+
;;
1522
-?*)
1623
printf 'Warning: Unknown option: %s\n' "$1" >&2
1724
;;
@@ -56,13 +63,13 @@ if [ "$build" -ne "0" ]; then
5663
cd /go/src/snowflake-webext
5764
npm install
5865
npm run build
59-
npm run webext
66+
npm run webext $browser
6067
#need to point to our localhost broker instead
6168
sed -i 's/snowflake-broker.freehaven.net/localhost:8080/' build/embed.js
6269
sed -i 's/snowflake-broker.freehaven.net/localhost:8080/' webext/embed.js
63-
sed -i 's/snowflake-broker.freehaven.net/localhost:8080/' webext/snowflake.js
70+
sed -i 's/snowflake-broker.freehaven.net/localhost:8080/' snowflake.js
6471
sed -i 's/snowflake.torproject.net/127.0.0.1/' build/embed.js
65-
sed -i 's/snowflake.torproject.net/127.0.0.1/' webext/snowflake.js
72+
sed -i 's/snowflake.torproject.net/127.0.0.1/' snowflake.js
6673

6774
cd /go/src
6875
fi

0 commit comments

Comments
 (0)