using THISDIR instead of WORKDIR
[feisty_meow.git] / scripts / archival / backup_trac.sh
old mode 100755 (executable)
new mode 100644 (file)
index 950c7c9..dadb621
@@ -1,16 +1,13 @@
 #!/bin/bash
 
-# backs up our trac repository.
+# backs up a trac repository into a tar.gz file.
 
-trac_path="$1"; shift
-
-if [ -z "$trac_path" ]; then
-  echo This script needs the path to the trac database.
-  exit 1
-fi
+export THISDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
 
-sep='_'
+trac_path="$1"; shift
+archive_path="$1"; shift
 
-tar -czf /z/stuffing/archives/trac_bkup_$(date +"%Y$sep%m$sep%d$sep%H%M$sep%S" | tr -d '/\n/').tar.gz "$trac_path" &>$TMP/zz_backup_trac.log
+# call our arbitrary backer upper, since this is a simple single directory case.
+bash $THISDIR/backup_arbitrary.sh "$trac_path" "$archive_path" "trac_bkup"