From 757e28dde46cb4808d87502276d6cf2e30feb6b6 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 12 Jan 2010 20:25:31 -0500 Subject: Convert include/exclude heredocs to simple variables. I'm sure I'll end up changing these to arrays sooner or later --- squashfu | 19 ++++++++++--------- squashfu.conf | 17 +++++++++-------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/squashfu b/squashfu index 02e98bb..b404fd9 100755 --- a/squashfu +++ b/squashfu @@ -78,10 +78,13 @@ create_new_incremental () { return 1; fi - INCLUDES=($(sed -n '/^</dev/null | awk '{print $1}')" - # TODO: Print totals - echo - printf "%10s\t%25s\t%7s\n" "" "$(basename $SEED)" "$(du -h "$SEED" 2>/dev/null | awk '{print $1}')" - echo - printf "%10s\t%25s\t%7s\n" "" "Grand Total" \ + # Print totals (not efficient -- reruns du on things we already ran it on) + printf "\n%10s\t%25s\t%7s\n" "" "$(basename $SEED)" "$(du -h "$SEED" 2>/dev/null | awk '{print $1}')" + printf "\n%10s\t%25s\t%7s\n" "" "Grand Total" \ "$(du -csh "$BINS_DIR" "$SEED" 2>/dev/null | grep -E "total$" | awk '{print $1}')" } diff --git a/squashfu.conf b/squashfu.conf index 9b3affb..27e3b3d 100644 --- a/squashfu.conf +++ b/squashfu.conf @@ -45,19 +45,20 @@ MAX_BINS=10 # not be true incrementals. See 'man rsync' for more info. RSYNC_OPTS=("-Rua" "--delete" "--stats") -# The following defines what will and won't be backed up. The format -# is that of a heredoc. Multiple include and exclude heredocs are NOT -# supported, although this config can be overridden in a separate config -# file with --config or -c.. +# The following defines what will and won't be backed up. The format +# is simply a multi line quoted variable, so you'll need to either single +# quote or escape white spaces and special characters in your paths. -<