summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSasa Bodiroza <jazzva@gmail.com>2008-07-08 20:26:41 +0000
committerSasa Bodiroza <jazzva@gmail.com>2008-07-08 20:26:41 +0000
commita2bb8499aa1cd9b00c25f2510e1f1228659def97 (patch)
tree61916e84ffa0ef01fca40bfed0d152a4f4f7f29c
parent39e2dba46bf2a936c7eccf3084510b0027974f44 (diff)
Improve med-xpi-pack to not include debian/ and temp-*/ directories, and to unpack JAR files back after XPI file is produced.
-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;