-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
executable file
·23 lines (20 loc) · 892 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/sh
set -e
set -x
# google-chrome --pack-extension=chrome-killfile-extension --pack-extension-key=chrome-killfile-extension.pem
# (cd firefox-killfile-extension && jpm xpi)
# mv firefox-killfile-extension/[email protected]*.xpi .
rm -f chrome-killfile-extension.zip
zip -vr chrome-killfile-extension chrome-killfile-extension
(cd zipextra && zip -vr ../chrome-killfile-extension chrome-killfile-extension)
rm -f firefox-killfile-extension.zip
(cd chrome-killfile-extension && zip -vr ../firefox-killfile-extension * -x manifest.json)
JSONMERGE='
import json, sys
a=json.load(open(sys.argv[1]))
b=json.load(open(sys.argv[2]))
a.update(b)
print json.dumps(a, sort_keys=True, indent=2, separators=(",", ": "))
'
python -c "$JSONMERGE" chrome-killfile-extension/manifest.json firefox-manifest-extra.json > manifest.json
zip -uvm firefox-killfile-extension manifest.json