-
Notifications
You must be signed in to change notification settings - Fork 56
/
createpackage.sh
executable file
·49 lines (38 loc) · 1 KB
/
createpackage.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
47
48
49
#!/usr/bin/env zsh
setopt extended_glob
## ================================ ##
function remove() {
echo "<$1>"
if [ -e $1 ]; then
rm -f $1
fi
}
# create jar file
if ! [ -e chrome ]; then
mkdir chrome
fi
echo "====================== Create jar file ========================="
remove chrome/keysnail.jar
zip -r -0 chrome/keysnail.jar \
content/*.{js,xul,xhtml}~(*~) \
content/resources/*~*~ \
content/prettifier/*~*~ \
content/modules/*.js~(*~) \
content/images/*.png~(*~) \
locale/**/*.*~(*~) \
skin/**/*.*~(*~|*.svg) \
skin/**/filter.svg
echo "====================== Create xpi file ========================="
# create xpi file
remove keysnail.xpi
zip -r -9 keysnail.xpi \
chrome/keysnail.jar \
defaults/**/*.*~(*~) \
install.rdf \
share/*.js~(*~) \
schemes/*.js~(*~) \
components/*.js~*~
cp chrome.manifest.pack /tmp/chrome.manifest
zip -j -9 keysnail.xpi /tmp/chrome.manifest
## ================================ ##
./updatehash.sh