3
# This script prepares and creates a .tar.gz package of
4
# the source tree. This should really be done with 'make dist'
5
# but until we get that working, this script does the job.
7
# Get the version number
8
VERSION=`cat ./configure.in | grep 'VERSION=' | cut -d'=' -f2`
9
echo 'Version number is '$VERSION
11
# Create the directory
12
DISTDIR=dolfin-$VERSION
13
echo 'Creating directory '$DISTDIR
19
make clean > /dev/null
22
FILES=`ls | grep -v $DISTDIR`
26
# Remove unecessary files
27
REMOVE1=`find $DISTDIR | grep CVS`
28
REMOVE2=`find $DISTDIR -name '*~'`
29
REMOVE3=`find $DISTDIR -name '*.a'`
30
REMOVE4=$DISTDIR'/config.cache '$DISTDIR'/config.status '$DISTDIR'/config.log'
31
REMOVE5=`find $DISTDIR | grep '\.deps'`
32
REMOVE=$REMOVE1' '$REMOVE2' '$REMOVE3' '$REMOVE4' '$REMOVE5
33
echo 'Removing unecessary files'
37
TARBALL='dolfin-'$VERSION'.tar.gz'
38
echo 'Creating arhive: '$TARBALL
39
tar zcf $TARBALL $DISTDIR
41
# Remove the directory
42
echo 'Removing temporary directory'
46
echo 'Unpacking tarball to check if it compiles'
50
echo 'Compiling in directory '$DISTDIR' (see make-'$VERSION'.log)'
51
MAKELOG='../make-'$VERSION'.log'
54
./configure >> $MAKELOG