#! /bin/sh
#
# Make a tar file for the test suite, removing the RCS files etc.
#
set -x
cd /tmp
/bin/rm -rf /tmp/mpich-test
cp -rp /home/MPI/mpich/examples/test /tmp/mpich-test
# The next copy pulls in versions of mpicc and mpirun that may
# be useful.
cp -rp /home/MPI/class/mpiexmpl/maint/envs /tmp/mpich-test/bin
#
# Update a few files
cp /home/MPI/mpich/util/tarch /tmp/mpich-test
chmod a+x /tmp/mpich-test/tarch
#
# Remove the RCS files, old executables, and debris
cd /tmp/mpich-test
find . \( -name 'RCS' -o -name '*.o' -o -name '#*#' -o \
              -name '*~' -o -name 'mputil.mp*' -o -name Makefile -o \
	      -name makefile -o -name 'PI*' -o -name '*.cit' \) -print | \
	sed 's%^%/bin/rm -rf %g' | sh
cd /tmp
tar cf - mpich-test | compress > mpich-test.tar.Z
tar cf - mpich-test | gzip > mpich-test.tar.gz
rm -f /home/ftp/pub/mpi-test/mpich-test.*
cp mpich-test.tar.Z /home/ftp/pub/mpi/mpi-test
cp mpich-test.tar.gz /home/ftp/pub/mpi/mpi-test
echo "tar file is in /home/ftp/pub/mpi/mpi-test"
/bin/rm -rf mpich-test
