#!/usr/bin/sh
# MKTAR.SH -- Create a new tar file with the cdbs src files

# Directories used in this shell script

FTP=/data/ra1/ftp/pub/bsimon
PARK=/data/ubik1/bsimon/park
NEWCDBS=/data/ubik1/bsimon/newcdbs

# Update the version string in system.h

cd $NEWCDBS
cd util
./configure.pl version

# Hide the binary files so they aren't part of the distribution

cd ../bin
mv * $PARK/bin
cd ../data
mv * $PARK/data
cd ../lib
mv * $PARK/lib
cd ../test/data
mv * $PARK/testdata

# Make the tar file

cd $NEWCDBS
tar -cvf $FTP/newcdbs.tar .

# Restore files not delivered as part of cdbs tar to original directory

cd $PARK
cd bin
mv * $NEWCDBS/bin
cd ../data
mv * $NEWCDBS/data
cd ../lib
mv * $NEWCDBS/lib
cd ../testdata
mv * $NEWCDBS/test/data


