-
Notifications
You must be signed in to change notification settings - Fork 1
/
build_ext.sh
executable file
·46 lines (36 loc) · 919 Bytes
/
build_ext.sh
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
printf "Building for firefox or chrome? "
read browser
if [ $browser == "chrome" ] || [ $browser == "firefox" ]
then
echo "Building for $browser..."
# Remove any old builds
rm dist.zip
# Build the modal
if [ $browser == "chrome" ]
then
cd src/modal && npm run build-cr
else
cd src/modal && npm run build-ff
fi
# Build the options page
cd ../options && npm run build
# Get back to the root
cd ../..
# Zip the result
if [ $browser == "chrome" ]
then
zip -r dist.zip _locales icons images \
libs manifest.json src/background.js \
src/iv.js src/modal/dist/js/bundle.js src/options/dist
else
node create_ff_manifest.js
zip -r dist.zip _locales icons images \
libs manifest.json src/background.js \
src/iv.js src/modal/dist/js/bundle.js src/options/dist
rm -f manifest.json
mv manifest.json.orig manifest.json
fi
else
echo "Invalid browser: '$browser'..."
fi