#!/bin/bash # # A simple script to make xpi files. # Version: 0.2 # # Original Author: Gordon Luk # Website: http://www.getluky.net/projects/mkxpi # # Patched by Johannes Findeisen to work more usefull. # Website: http://hanez.org # # Notes: # It expects the following directory structure: # / - Project directory, will place finished xpi file here. # //install.rdf - Installation RDF # //install.js - Installation JavaSript # //chrome/ - will make the .jar file here. # //chrome/content/ - project content files # //chrome/locale/ - project locale files # //chrome/skin/ - project skin files usage() { echo "Usage: mkxpi " } path=$1 project=$2 version=$3 if [ "1$project" = "1" ]; then usage exit 1 fi if [ "1$path" = "1" ]; then usage exit 1 fi if [ "1$version" = "1" ]; then usage exit 1 fi cd $path cd chrome jar -cfM $project.jar ./content ./skin ./locale cd $path jar -cfM $project-$version-fx.xpi ./chrome/$project.jar ./install.rdf mv $project-$version-fx.xpi ../ echo "Cleaning up..." cd $path rm ./chrome/$project.jar echo "Done!" exit 0