#!/bin/csh -f

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

set cfpath = `pwd`

set version = ( `grep VERSION $cfpath/../src/globals.c | cut -d\" -f2` )

echo Making tmp directory...$version

mkdir ~/$version
cd ~/comp/GNU-cfengine
echo Copying files in `pwd`
tar cf - . | ( cd ~/$version; tar xf - )
cd ~
chmod 755 $version
tar zcf $version.tar.gz $version
rm -r $version


echo New distribution is $version.tar.gz in ~