forked from chatziko/location-guard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy
executable file
·35 lines (30 loc) · 848 Bytes
/
deploy
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
#!/bin/bash
set -e
DIST=dist
case "$1" in
chrome)
mkdir -p $DIST/chrome
cp -r src/common/* $DIST/chrome/
cp -r src/chrome $DIST/
;;
firefox)
rm -fR $DIST/firefox
mkdir -p $DIST/firefox/data
cp -r src/common/* $DIST/firefox/data/
cp -r src/firefox $DIST/
# create lib/main.js containing data/js/{util,browser_base,browser,main}.js
# This avoids the use of require() as well as the duplicate files in
# lib/ and data/
#
cat $DIST/firefox/data/js/{util,browser_base,browser,main}.js > $DIST/firefox/lib/main.js
rm $DIST/firefox/data/js/main.js # not needed, avoid duplicates
cd ./dist/firefox
jpm xpi
mv location-spoofer.xpi ./../../
;;
clean)
rm -rf $DIST
;;
*)
echo use deploy {chrome,firefox,clean}
esac