From 9ef25e4dcbd9cfee61bf1d3b54e85aa006a2a42e Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sun, 1 Jan 2017 20:14:15 -0500 Subject: [PATCH] refactored trac backup using the arbitrary backup script in the backup trac script now. also fixed algorithms makefile for name change. --- nucleus/library/algorithms/makefile | 2 +- scripts/archival/backup_trac.sh | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) 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" -- 2.34.1