From b635d1ce9d2cfedb89e945c29e1e02a6020fabab Mon Sep 17 00:00:00 2001 From: Infocatcher Date: Wed, 18 Dec 2013 21:31:48 +0400 Subject: [PATCH] Add simple script to build xpi under Linux, thanks to @multiSnow (closes #123) --- make.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 make.sh diff --git a/make.sh b/make.sh new file mode 100644 index 0000000..9727adb --- /dev/null +++ b/make.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +PROG=false +XPI=private_tab-latest.xpi +FILES='install.rdf *.manifest *.js *.jsm *.xul *.xml *.html license* *.png defaults modules components locale chrome idl' + +for z in 7za 7z zip +do + if command -v $z >/dev/null 2>&1 + then + PROG=$z + break + fi +done + +if test $PROG = false +then + echo "usable program not found, abort." + exit 1 +else + echo "use $PROG to create xpi." +fi + +if test $PROG = zip +then + $PROG -9r $XPI $FILES +else + $PROG a -tzip -mm=Deflate -mx9 -mfb258 -mpass=15 $XPI $FILES +fi \ No newline at end of file