Thursday, February 09, 2006

Firefox extension packaging script

Pre-requisite:
  1. 7zip or any other compression utility.
  2. This script must be run from top most, build directory (i.e. where install.rdf and chrome directory resides).
  3. The directory must have the exact same name as the chrome/jar name in install.rdf. It is case SENSITIVE.
#!/bin/bash
x=`basename \`pwd\``
mkdir build/
mkdir build/chrome
cd chrome
7z a -tzip "$x.jar" * -r -mx=0
mv "$x.jar" ../build/chrome
cd ..
cp install.* build
cd build
7z a -tzip "$x.xpi" * -r -mx=9
mv "$x.xpi" ../
cd ..
rm -rf build

No comments: