Created
September 9, 2010 18:38
-
-
Save retornam/572304 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##replacenameofext with your extension name | |
#!/bin/bash | |
# short-name or xpi files name. | |
EXT_NAME=nameofext | |
## Must be lowercase with no spaces | |
CHROME_PROVIDERS="content" | |
# # which chrome providers we have | |
## (space-separated list) | |
ROOT_DIRS="defaults" | |
# ...and these directories | |
## (space separated list) | |
ROOT_DIR=`pwd` | |
TMP_DIR=build | |
# remove any left-over files | |
##from previous builds | |
rm -f $EXT_NAME.xpi | |
rm -rf $TMP_DIR | |
mkdir -p $TMP_DIR/chrome/content | |
cp -v -R chrome/*.* $TMP_DIR/chrome | |
cp -v -R content $TMP_DIR/chrome | |
cp -v -R locale $TMP_DIR/chrome | |
cp -v -R skin $TMP_DIR/chrome | |
cp -v -R defaults $TMP_DIR | |
cp -v install.rdf $TMP_DIR | |
cp -v chrome.manifest $TMP_DIR | |
# generate the XPI file | |
cd $TMP_DIR | |
echo "Generating $EXT_NAME.xpi..." | |
zip -r ../$EXT_NAME.xpi * | |
cd "$ROOT_DIR" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment