File:  [mozdev] / chameleon / scripts / makeJar
Revision 1.6: download - view: text, annotated - select for diffs - revision graph
Thu Aug 30 21:48:50 2001 UTC (16 years, 3 months ago) by petejc
Branches: MAIN
CVS tags: HEAD
--pete

#!/bin/sh

# DO NOT EDIT BELOW THIS LINE

INS_DIR=${SRC_DIR}/${CVS_MOD}/www/xpi;

printf "\nCreating xpi for ${CVS_MOD}\n\n";

DIRNAME=${PACKAGE_NAME}

EXT1=.tar.gz;
EXT2=_current.xpi
TAR_BALL=${CVS_MOD}$EXT1;
XPI=${CVS_MOD}$EXT2;

TARGET_DIR=/tmp/xpi;
TARGET_FILE=$TARGET_DIR/$TAR_BALL;

if test -r $TARGET_DIR
then
printf "\nRemoving $TARGET_DIR as part of clean up . . . \n"; 
rm -rf $TARGET_DIR;
fi

mkdir $TARGET_DIR;
printf "Creating temp folder $TARGET_DIR . . . \n"; 

${SCRIPT_DIR}/makeDependPkg;

printf "Tarring up package sources . . . \n"; 
tar --create --verbose --compress --file=$TARGET_FILE --exclude=CVS install.js.jar $DIRNAME/ 

cd $TARGET_DIR;

printf "Extracting package sources in temp folder $TARGET_DIR . . . \n"; 
tar xfz $TAR_BALL;

wait;

printf "Removing temp tarball . . . \n"; 
rm $TAR_BALL;

if test -r $INS_DIR/$XPI
then
printf "Removing old xpi . . . \n"; 
rm -f $INS_DIR/$XPI;
fi

wait;

cd $DIRNAME;

printf "Creating $DIRNAME.jar file . . .\n\n"; 
zip -r ../$DIRNAME.jar *;

wait;

rm -rf *;

cd ../;

mv install.js.jar install.js;

rm -r $DIRNAME;

printf "\n\nZipping up xpi $XPI. . .\n\n\n\n"; 
zip -r $INS_DIR/$XPI *;

printf "\n\nFinished creating xpi for \"${CVS_MOD}\"\n";
printf "Location: $INS_DIR/$XPI\n\n";



FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>