#!/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"
  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
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.tar.Z
cd $1
#/usr/bin/ls `cat $1/distrib/wx_asc.rsp $1/distrib/wx_bin.rsp` > /tmp/tarwx
tar cvf $2/wx160.tar `cat $1/distrib/wx_asc.rsp $1/distrib/wx_bin.rsp`
#/bin/rm -f /tmp/tarwx
echo Compressing...
gzip $2/wx160.tar
/bin/mv $2/wx160.tar.gz $2/wx160.tgz

echo
echo wxWindows archived.
exit
