#!/bin/csh
### --- The University of Birmingham 2000
### $poplocal/local/ftp/bin/mkpopcdtar
# Aaron Sloman 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

cp -p $poplocal/local/ftp/linux-cd/*EVERYTHING* .

## 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 "linux-poplog/AATARBUILD-`date +%F`"

ln -s */*.txt  .

ln -s */copyright.html .

touch "DOCFILES duplicated in linux-poplog directory"

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"
