-
-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathbuild.sh
More file actions
70 lines (39 loc) · 1.52 KB
/
build.sh
File metadata and controls
70 lines (39 loc) · 1.52 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# PHEx Build Script
# Prefix
PREFIX="[PHEx Builder] "
echo ""
# echo with prefix
xlog () {
echo "$PREFIX$1"
}
# exit with message
ext () {
echo "$1"
exit 0
}
# Delete build/extension.zip
xlog "Deleting extension.zip..."
rm build/extension.zip && xlog "Deleted extension.zip" || xlog "No extension.zip found"
# Delete build/extension.xpi
xlog "Deleting extension.xpi..."
rm build/extension.xpi && xlog "Deleted extension.xpi" || xlog "No extension.xpi found"
echo ""
# Tell the user that the chromium extension is being zipped
xlog "Zipping chromium extension..."
# Go into ./src/
cd ./src/
# Zip ./src/ to ./build.extension.zip
zip -q -r ../build/extension.zip ./ && xlog ".ZIP chromium extension built -> extension.zip"
# Tell the user that we've build the chromium extension successfully.
xlog "Chromium extension Success!" && echo ""
# Go out of ./src/ and into ./firefox/
cd ../firefox/
# Zip ./firefox/ to ./build.extension.xpi
zip -q -r ../build/extension.xpi ./ && xlog ".XPI file built -> extension.xpi"
# Tell the user that we've build the firefox extension successfully.
xlog "Firefox extension Success!" && echo ""
# When making .crx extensions, it needs to be signed with a private key file to work.
# Tell the user that extension.crx needs to be signed if it's a production-used release.
echo "\033[0;31m" && xlog "IMPORTANT: IF YOU ARE MAKING AN OFFICIAL PHEx RELEASE, THEN PLEASE REMEMBER TO SIGN THE .CRX WITH A PRIVATE KEY FILE." && echo ""
# Tell the user that we're done.
echo "\033[0m" && xlog "Done!"