summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README4
-rwxr-xr-xsrc/med-xpi-pack7
2 files changed, 9 insertions, 2 deletions
diff --git a/README b/README
index 32e716d..34e42b2 100644
--- a/README
+++ b/README
@@ -252,7 +252,9 @@ packed to "test.jar" file. After that, it will remove all JAR directories.
Finally, it will pack the contents of the input directory to the XPI file,
which is placed inside the provided input directory. This behaviour is because
xpi.mk will look for XPI file inside top-level extension directory, which is
-the input directory in that case.
+the input directory in that case. The script doesn't pack debian/ and temp-*/
+directorie to the XPI file. After XPI file is produced, it will unpack all JAR
+files, in order to leave intact source.
To run it, pass the name of the input directory, and the name of the XPI file:
$ med-xpi-pack . ubufox.xpi
diff --git a/src/med-xpi-pack b/src/med-xpi-pack
index 67c9f04..0c7236d 100755
--- a/src/med-xpi-pack
+++ b/src/med-xpi-pack
@@ -57,6 +57,11 @@ for JAR_DIR in `find . -type d -name *.jar\!` ; do
rm -rf $ABS_JAR_PATH;
done;
echo "Packing $XPIFILE";
-zip -q -r $XPIFILE *;
+zip -q -r $XPIFILE * -x debian/\* temp-*/\*;
echo "Packed XPI file. It is located in `pwd`";
+for JAR_PATH in `find . -name *.jar` ; do
+ echo "Unpacking $JAR_PATH";
+ unzip -q $JAR_PATH -d $JAR_PATH!;
+ rm -f $JAR_PATH;
+done;
popd > /dev/null;