diff options
author | Sasa Bodiroza <jazzva@gmail.com> | 2008-07-08 20:26:41 +0000 |
---|---|---|
committer | Sasa Bodiroza <jazzva@gmail.com> | 2008-07-08 20:26:41 +0000 |
commit | a2bb8499aa1cd9b00c25f2510e1f1228659def97 (patch) | |
tree | 61916e84ffa0ef01fca40bfed0d152a4f4f7f29c | |
parent | 39e2dba46bf2a936c7eccf3084510b0027974f44 (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-- | README | 4 | ||||
-rwxr-xr-x | src/med-xpi-pack | 7 |
2 files changed, 9 insertions, 2 deletions
@@ -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; |