File:  [mozdev] / chameleon / scripts / Attic / makeChameleon
Revision 1.3: download - view: text, annotated - select for diffs - revision graph
Fri Sep 29 13:58:28 2000 UTC (18 years, 6 months ago) by petejc
Branches: MAIN
CVS tags: PR3, M18, HEAD
working on getting nightly xpinstall to work

--pete

#!/bin/sh

# this shell script builds and xpi from the cvs source
# just adjust the paths below to suit your needs
# --pete

# Edit this path this is where 
# you finished .xpi file will be installed 

INS_DIR=/usr/src/CHAMELEON/chameleon/www;

if test $1
then

printf "\nCreating xpi for $1\n\n";

DIRNAME=$1

EXT1=.tar.gz;
EXT2=_current.xpi
TB=$DIRNAME$EXT1;
XPI=$DIRNAME$EXT2;

TARGET_DIR=/tmp/xpi;
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 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;

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

printf "\n\nFinished creating xpi for \"$DIRNAME\"\n";
printf "Location: $INS_DIR/$XPI\n\n";

else
printf "\n\nusage: $0 <dirname>\n\n";
exit

fi


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