#!/bin/sh
EXCLUDES=
WHICH=
if [ -r xcl ]
then
EXCLUDES="-X xcl"
fi
 
if [ "$2" ]
then
WHICH="_$2"
fi
 
tar $EXCLUDES -czf $1.`date +"%Y-%m-%d_%H-%M"`"$WHICH".tgz $1
echo $1.`date +"%Y-%m-%d_%H-%M"`"$WHICH".tgz

User Tools