File:  [mozdev] / aphrodite / scripts / makeJar
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Wed Apr 3 13:57:22 2002 UTC (15 years, 6 months ago) by petejc
Branches: MAIN
CVS tags: HEAD
adding build scripts

--pete

#!/bin/sh

# this shell script builds and xpi from the cvs source
# --pete

# DO NOT EDIT BELOW THIS LINE

TMP_NAME=xpi;
INS_DIR=${inst_dir}/$TMP_NAME;

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

DIRNAME=${package_name}

EXT1=.tar.gz;
EXT2=_current.xpi
TB=${code_name}$EXT1;
XPI=${code_name}$EXT2;

TARGET_DIR=${sys_tmp}/$TMP_NAME;
TARGET_FILE=$TARGET_DIR/$TB;

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"; 

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

cd $TARGET_DIR;

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

wait;

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

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

wait;

cd $DIRNAME;

printf "Creating ${code_name}.jar file . . .\n\n"; 
zip -r ../${code_name}.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 \"${code_name}\"\n";
printf "Location: $INS_DIR/$XPI\n\n";



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