#!/bin/sh

# Author: Brandon Parker
# Date: 4/23/03
# Publishing utility to help in version control and group accessability of the project.

echo "Cleaning up..."
rm *~ -f

echo
echo "Compiling..."
make
z=".gz"
c="tar -cvzf "
f=" lab* Queue* Makefile gameserver.h publish readme"
t=`date | awk '{print $4}' | awk -F ':' '{print $1"."$2".tar.gz"}'`
d=`date -I | awk -F '-' '{print "game-"$2"-"$3"-"}'`

echo
echo "Creating Tarball..."
$c$d$t$f

#echo
#echo "Compressing..."
#gzip $d$t

echo
echo "Publishing " $d$t "..."
cp $d$t ~/public_html/3780

chmod 644 ~/public_html/3780/$d$t
echo
echo "DONE"
