summaryrefslogtreecommitdiff
path: root/chromium/makecrx.sh
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/makecrx.sh')
-rwxr-xr-xchromium/makecrx.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/chromium/makecrx.sh b/chromium/makecrx.sh
index b0b8f2e..d290a44 100755
--- a/chromium/makecrx.sh
+++ b/chromium/makecrx.sh
@@ -5,8 +5,6 @@
# Based on bash script at:
# http://code.google.com/chrome/extensions/crx.html
# Licensed under the BSD license
-#
-# NOTE: does not yet work perfectly with 9base tools
test $# -ne 2 && echo "Usage: $0 dir pem" && exit 1
@@ -24,8 +22,9 @@ openssl rsa -pubout -outform DER < "$key" > "$pub" 2>/dev/null
crmagic_hex="4372 3234" # Cr24
version_hex="0200 0000" # 2
-pub_len_hex=`stat -c %s "$pub" | xargs printf '%08x\n' | rev | dd conv=swab 2>/dev/null`
-sig_len_hex=`stat -c %s "$sig" | xargs printf '%08x\n' | rev | dd conv=swab 2>/dev/null`
+# use /bin/dd as 9base dd has different syntax expectations
+pub_len_hex=`stat -c %s "$pub" | xargs printf '%08x\n' | rev | /bin/dd conv=swab 2>/dev/null`
+sig_len_hex=`stat -c %s "$sig" | xargs printf '%08x\n' | rev | /bin/dd conv=swab 2>/dev/null`
echo "$crmagic_hex $version_hex $pub_len_hex $sig_len_hex" | xxd -r -p
cat "$pub" "$sig" "$zip"