#!/usr/bin/sh
# Tar and gzip an external distribution of wxWindows.

if [ "$1" = "" -o "$2" = "" ]
then
  echo "Make external wxWindows distribution in gzipped-tar format."
  echo "Makes wx160.tgz, wx160_ps.tgz, wx160_hlp.tgz, wx160_xlp.tgz"
  echo "Usage: tardist source destination"
  echo "e.g. tardist ~/wx ~/wx/deliver"
  exit
fi


echo About to tar wxWindows distribution:
echo   From   $1
echo   To     $2/wx160.tgz, $2/wx160_ps.tgz, $2/wx160_hlp.tgz, $2/wx160_xlp.tgz
echo CTRL-C if this is not correct.
read dummy

# cd $1/src/base ; make -f makefile.unx docs
# cd $1/docs ; emacs readme.txt ; emacs changes.txt ; emacs ../install/install.txt

/bin/rm -f $2/wx160*.tgz
cd $1
tar cvf $2/wx160.tar `cat $1/distrib/wx_asc.rsp $1/distrib/util_asc.rsp $1/distrib/wx_bin.rsp $1/distrib/util_bin.rsp`
echo Compressing wx160.tar...
gzip $2/wx160.tar
/bin/mv $2/wx160.tar.gz $2/wx160.tgz

tar cvf $2/wx160_ps.tar `cat $1/distrib/wx_ps.rsp`
echo Compressing wx160.tar...
gzip $2/wx160_ps.tar
/bin/mv $2/wx160_ps.tar.gz $2/wx160_ps.tgz

tar cvf $2/wx160_hlp.tar `cat $1/distrib/wx_hlp.rsp`
echo Compressing wx160_hlp.tar...
gzip $2/wx160_hlp.tar
/bin/mv $2/wx160_hlp.tar.gz $2/wx160_hlp.tgz

tar cvf $2/wx160_xlp.tar `cat $1/distrib/wx_xlp.rsp`
echo Compressing wx160_xlp.tar...
gzip $2/wx160_xlp.tar
/bin/mv $2/wx160_xlp.tar.gz $2/wx160_xlp.tgz

echo
echo wxWindows archived.
exit
