File:  [mozdev] / aphrodite / scripts / make
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
# paths below are set from Makefile.in
# --pete

# DO NOT EDIT BELOW THIS LINE

ins_dir=${inst_dir}/xpi;

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

ext1=.tar.gz;
ext2=_current_static.xpi
tb=${package_name}$ext1;
xpi=${code_name}$ext2;

taret_dir=${sys_tmp}/xpi;
target_file=$taret_dir/$tb;

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

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

printf "Tarring up package sources . . . \n"; 
tar --create --compress --file=$target_file --exclude=CVS install.js ${package_name}/

cd $taret_dir;

printf "Extracting package sources in temp folder $taret_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;

if test ${package_name} != ${code_name}; then
  mv ${package_name} ${code_name};
fi

wait;

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

wait;

printf "\n\nFinished creating xpi for \"${code_name}\"\n";
printf "Location: $ins_dir/$xpi\n\n";

exit;


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