#!/bin/csh
### --- The University of Birmingham 2000
### $poplocal/local/ftp/bin/mkpopcdtar
# Aaron Sloman
# updated 3 Jan 2005 (to include run* and other files)
# updated 17 Feb 2003
# Updated for new configuration 1 Sep 2002
# Create the packaged tar files for linux poplog plus Bham extras

echo "Assuming everything is up to date"

echo "making Linux poplog CD tar file"
cd $poplocal/local/

echo "removing old file"
ls -l ftp/bham-linux-poplog.tar.gz
#rm -f ftp/bham-linux-poplog.tar.gz

mkdir temp.linuxtarfiles
cd temp.linuxtarfiles
mkdir linux-poplog
ln -s $poplocal/local/ftp/linux-cd/* linux-poplog


## No longer need this. Instructions changed.
## move up the main tar file so that it untars into the linux-poplog dir
##mv linux-poplog/linux-poplog.tar.gz .

touch "AATARBUILD-`date +%F`"

ln -s */COPYRIGHT.html .

mv */*.txt  .

mv */*EVERYTHING* .

mv */CHECK_LINUX_FACILITIES .

mv */run* .

# touch "DOCFILES duplicated in linux-poplog directory"

touch This-is-poplog-version-15.53f

echo "temporary files created"

ls -l

#tar cfhz $local/ftp/bham-linux-poplog-f.tar.gz *
tar cfhz $local/ftp/bham-linux-poplog.tar.gz *

ls -l $local/ftp/bham-linux-poplog.tar.gz

cd ..

echo "Removing temporary files"
rm -rf temp.linuxtarfiles


echo "done"

echo "Dont forget to Update ls-lrt"
