Skip to content

Commit 0c089b5

Browse files
committed
Cleanup
1 parent 445310f commit 0c089b5

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

build-chrome-ext.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
# Source: http://developer.chrome.com/extensions/crx.html
55

66
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
99
fi
1010

1111
EXT_PREFIX=$1
@@ -21,14 +21,14 @@ mkdir -p "$TEMP_DIR"
2121

2222
# Change to build/extension_name.safariextension
2323
( 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" . )
2525

2626
openssl sha1 -sha1 -binary -sign "$CERT_DIR/chrome.pem" < "$zip" > "$sig"
2727
openssl rsa -pubout -outform DER < "$CERT_DIR/chrome.pem" > "$pub" 2>/dev/null
2828

2929
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}"
3232
}
3333

3434
crmagic_hex="4372 3234" # Cr24
@@ -39,8 +39,8 @@ pub_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$pub" | awk '{print $5}')))
3939
sig_len_hex=$(byte_swap $(printf '%08x\n' $(ls -l "$sig" | awk '{print $5}')))
4040

4141
(
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"
4444
) > "$EXT_PREFIX.crx"
4545

4646

build.rb

-5
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@
8181
@text_files.push 'popover.html'
8282
@cs_files.push 'popover.coffee'
8383
end
84-
85-
puts "@cs_files: #{@cs_files}"
86-
puts "@text_files: #{@text_files}"
87-
puts "@binary_files: #{@binary_files}"
88-
8984
end
9085

9186
task :preflight => [:build_arrays] do

0 commit comments

Comments
 (0)