1stMud/CVS/
1stMud/area/CVS/
1stMud/backup/CVS/
1stMud/bin/
1stMud/bin/CVS/
1stMud/bin/extras/
1stMud/bin/extras/CVS/
1stMud/data/CVS/
1stMud/data/i3/CVS/
1stMud/doc/1stMud/
1stMud/doc/1stMud/CVS/
1stMud/doc/CVS/
1stMud/doc/Diku/
1stMud/doc/Diku/CVS/
1stMud/doc/MPDocs/CVS/
1stMud/doc/Merc/CVS/
1stMud/doc/Rom/
1stMud/doc/Rom/CVS/
1stMud/log/CVS/
1stMud/notes/
1stMud/notes/CVS/
1stMud/player/CVS/
1stMud/player/backup/CVS/
1stMud/player/deleted/CVS/
1stMud/src/CVS/
1stMud/src/config/CVS/
1stMud/src/h/CVS/
1stMud/src/o/CVS/
1stMud/win/CVS/
#!/bin/sh
#
# Smaug Backup script by Dan aka Darkwolf aka Mnementh
# mudadmin@daisy.goodnet.com
#
# Modded for 1stMud by Markanth
# markanth@firstmud.com

# Set the backup dir. The Path you want the backup files to reside

BDIR=../backup

CDIR=../

# These are the tar flags. Man tar for info on the flags,
# Default shows verbose output of whats happinin, take v out
# if you dont like this

EXFLAGS='--exclude='rom' --exclude='*.o' --exclude='*~' --exclude='*.out' --exclude='core''
TFLAGS='$EXFLAGS -czf'

# Code to add to your Makefile.
#
# backup:
#	./backup clean
#	./backup all

# Edit this only if tar, mv, or gzip is somewhere wierd :)
#
# PATH=/bin:/usr/bin

##################################################################
# End of user spec's.                                            #
# Do not edit below this line unless you know what you are doing #
##################################################################

DATE=`date +%m%d`
cd $CDIR

case "$1" in
   all)
	$0 player
	$0 area
	$0 data
	$0 src
	echo Done backup all.
	;;
   player)
	FILE=$BDIR/player.$DATE.tar.gz
	tar $TFLAGS $FILE player
	echo Done with $FILE.
	;;
   area)
	FILE=$BDIR/area.$DATE.tar.gz
        tar $TFLAGS $FILE area
        echo Done with $FILE.
	;;
   data)
	FILE=$BDIR/data.$DATE.tar.gz
        tar $TFLAGS $FILE data
        echo Done with $FILE.
	;;
   src)
	FILE=$BDIR/src.$DATE.tar.gz
        tar $TFLAGS $FILE src
        echo Done with $FILE.
	;;
   clean)
        rm -rf $BDIR/*.tar.gz
        echo Done cleaning backups.
        ;;
   *)
	echo "Usage $0 [all|player|area|src|data|clean]"
	exit 1
esac

exit 0