From: Chris Koeritz Date: Mon, 2 Jan 2017 01:14:15 +0000 (-0500) Subject: refactored trac backup X-Git-Tag: 2.140.90~296 X-Git-Url: https://feistymeow.org/gitweb/?p=feisty_meow.git;a=commitdiff_plain;h=9ef25e4dcbd9cfee61bf1d3b54e85aa006a2a42e refactored trac backup using the arbitrary backup script in the backup trac script now. also fixed algorithms makefile for name change. --- diff --git a/nucleus/library/algorithms/makefile b/nucleus/library/algorithms/makefile index 8cf4b298..8dd60e43 100644 --- a/nucleus/library/algorithms/makefile +++ b/nucleus/library/algorithms/makefile @@ -2,7 +2,7 @@ include cpp/variables.def PROJECT = algorithms TYPE = library -SOURCE = placeholder.cpp +SOURCE = sorts.cpp TARGETS = algorithms.lib include cpp/rules.def diff --git a/scripts/archival/backup_trac.sh b/scripts/archival/backup_trac.sh index e1588121..f96e5ae5 100755 --- a/scripts/archival/backup_trac.sh +++ b/scripts/archival/backup_trac.sh @@ -1,18 +1,13 @@ #!/bin/bash -# backs up our trac repository. +# backs up a trac repository into a tar.gz file. + +export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory. trac_path="$1"; shift archive_path="$1"; shift -if [ -z "$trac_path" -o -z "$archive_path" ]; then - echo This script needs the path to the trac database as the first parameter - echo and the path to the storage directory as the second parameter. - exit 1 -fi - -sep='_' - -tar -czf "${archive_path}/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 $WORKDIR/backup_arbitrary.sh "$trac_path" "$archive_path" "trac_bkup"