#!/bin/bash GAME=oomermaid DIR="/home/lch/dominions3/savedgames/$GAME" # make backups pushd "$DIR/.." tar czf "/home/lch/dominions3/backups/"$GAME-$(date +%s)-pre.tgz $GAME popd # blank the log files after backup cp /dev/null $DIR/$GAME.log cp /dev/null $DIR/$GAME.err