1
0

Improved toolchain

This commit is contained in:
Markus Birth 2013-06-25 09:38:24 +02:00
parent bc1477ab37
commit 2d38ad0086
3 changed files with 28 additions and 3 deletions

@ -1,3 +1,4 @@
#!/bin/sh
# Yes, I'm paranoid!
echo "Generating RSA key in PKCS#8 format..."
openssl genrsa 4096 | openssl pkcs8 -topk8 -nocrypt -out key.pem

@ -1,2 +1,2 @@
#!/bin/sh
chrome.exe --pack-extension=src --pack-extension-key=key.pem
chrome.exe --pack-extension=src

28
make.sh

@ -1,8 +1,32 @@
#!/bin/sh
google-chrome --pack-extension=src --pack-extension-key=key.pem
if [ ! -f key.pem ]; then
./genkey.sh
fi
SRCDIR="src"
FILENAME="gplusblacklist"
NAME=`grep "\"name\":" src/manifest.json | sed -e 's/^.*: "\(.*\)\".*$/\1/'`
VERSION=`grep "\"version\":" src/manifest.json | sed -e 's/^.*: "\(.*\)\".*$/\1/'`
OUTPUT="$FILENAME-$VERSION.crx"
if [ -f "$SRCDIR.crx" ]; then
echo "Cleaning up old $SRCDIR.crx."
rm "$SRCDIR.crx"
fi
echo "Generating $NAME $VERSION..."
google-chrome --pack-extension="$SRCDIR/" --pack-extension-key="key.pem" >/dev/null
if [ ! -f "$SRCDIR.crx" ]; then
echo "ERROR: Could not compile extension!"
exit 1
fi
# rename output file
mv src.crx gplusblacklist.crx
mv "$SRCDIR.crx" "$OUTPUT"
echo "Compiled $OUTPUT ."
# remove Chrome garbage
if [ -f libpeerconnection.log ]; then