#!/bin/csh -f

# This is mainly for Sun workstations.
# Since I am not encouraging anyone to make their own distributions
# this lack of generality doesn't bother me.
#

if ( ! -f .cfversion ) then

  echo Build this from the src directory
  exit 1

endif

set cfpath = `pwd`
set version=(`/bin/cat .cfversion`)

rm -f .cfversion

echo Making tmp directory...$version[1]
mkdir ~/$version[1]
cd ..
echo Copying files in `pwd`
tar cf - . | (cd ~/$version[1]; tar xf - )
cd ~
chmod 755 $version[1]
tar cf $version[1].tar $version[1]
gzip $version[1].tar
rm -r $version[1]


echo New distribution is $version[1].tar.gz in ~