#!/usr/bin/csh
# Tar and compress an external distribution of wxWindows.

set init=
if ( $1 == "" ) then
goto usage
endif

if ( $2 == "" ) then
goto usage
endif

echo About to tar wxWindows distribution:
echo   From   $1
echo   To     $2/wx150_1.tar.Z, $2/wx150_2.tar.Z
echo CTRL-C if this is not correct.
set dummy=$<

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

/bin/rm -f $2/wx150_1.tar.Z
/bin/rm -f $2/wx150_2.tar.Z
cd $1
/usr/bin/ls `cat $1/distrib/wx_asc.rsp` > /tmp/tarwx
tar cvf $2/wx150_1.tar -I /tmp/tarwx
/bin/rm -f /tmp/tarwx
/usr/bin/ls `cat $1/distrib/wx_bin.rsp` > /tmp/tarwx
tar cvf $2/wx150_2.tar -I /tmp/tarwx
/bin/rm -f /tmp/tarwx
echo Compressing...
compress $2/wx150_1.tar
compress $2/wx150_2.tar

echo
echo wxWindows archived.
goto end

usage:
echo Make external wxWindows distribution in compressed tar format.
echo Makes wx150_1.tar.Z, wx150_2.tar.Z.
echo Usage: tardist source destination
echo e.g. tardist ~/wx ~/wx/deliver

end:
