File tree 2 files changed +7
-12
lines changed
2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change 4
4
# Source: http://developer.chrome.com/extensions/crx.html
5
5
6
6
if test $# -ne 4; then
7
- echo " Usage: build-chrome-ext.sh EXT_PREFIX CERT_DIR TEMP_DIR BUILD_SRC"
8
- exit 1
7
+ echo " Usage: build-chrome-ext.sh EXT_PREFIX CERT_DIR TEMP_DIR BUILD_SRC"
8
+ exit 1
9
9
fi
10
10
11
11
EXT_PREFIX=$1
@@ -21,14 +21,14 @@ mkdir -p "$TEMP_DIR"
21
21
22
22
# Change to build/extension_name.safariextension
23
23
( cd " $TEMP_DIR /$BUILD_SRC " &&
24
- zip -qr --exclude=* .Info.plist* --exclude=* .coffee -9 -X " $zip " . )
24
+ zip -qr --exclude=* .Info.plist* --exclude=* .coffee -9 -X " $zip " . )
25
25
26
26
openssl sha1 -sha1 -binary -sign " $CERT_DIR /chrome.pem" < " $zip " > " $sig "
27
27
openssl rsa -pubout -outform DER < " $CERT_DIR /chrome.pem" > " $pub " 2> /dev/null
28
28
29
29
byte_swap () {
30
- # Take "abcdefgh" and return it as "ghefcdab"
31
- echo " ${1: 6: 2}${1: 4: 2}${1: 2: 2}${1: 0: 2} "
30
+ # Take "abcdefgh" and return it as "ghefcdab"
31
+ echo " ${1: 6: 2}${1: 4: 2}${1: 2: 2}${1: 0: 2} "
32
32
}
33
33
34
34
crmagic_hex=" 4372 3234" # Cr24
@@ -39,8 +39,8 @@ pub_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$pub" | awk '{print $5}')))
39
39
sig_len_hex=$( byte_swap $( printf ' %08x\n' $( ls -l " $sig " | awk ' {print $5}' ) ) )
40
40
41
41
(
42
- echo " $crmagic_hex $version_hex $pub_len_hex $sig_len_hex " | xxd -r -p
43
- cat " $pub " " $sig " " $zip "
42
+ echo " $crmagic_hex $version_hex $pub_len_hex $sig_len_hex " | xxd -r -p
43
+ cat " $pub " " $sig " " $zip "
44
44
) > " $EXT_PREFIX .crx"
45
45
46
46
Original file line number Diff line number Diff line change 81
81
@text_files . push 'popover.html'
82
82
@cs_files . push 'popover.coffee'
83
83
end
84
-
85
- puts "@cs_files: #{ @cs_files } "
86
- puts "@text_files: #{ @text_files } "
87
- puts "@binary_files: #{ @binary_files } "
88
-
89
84
end
90
85
91
86
task :preflight => [ :build_arrays ] do
You can’t perform that action at this time.
0 commit comments