From 8c5171836be85d47ed5399447c75167d9eb58399 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Mon, 10 Oct 2011 23:33:47 -0400 Subject: [PATCH] Make the EXCLUDES/ALWAYS file optional --- wizbackup-driver | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wizbackup-driver b/wizbackup-driver index 1a5d0bc..6fbc2fd 100755 --- a/wizbackup-driver +++ b/wizbackup-driver @@ -45,10 +45,10 @@ else fi for host in $HOSTS; do - opts="--exclude-from $EXCLUDES_DIR/ALWAYS" - if [ -f "$EXCLUDES_DIR/$host" ]; then - opts="$opts --exclude-from $EXCLUDES_DIR/$host" - fi + opts="" + for file in "$EXCLUDES_DIR/ALWAYS" "$EXCLUDES_DIR/$host"; do + [ -f $file ] && opts="$opts --exclude-from $file" + done start_time=$(date +%s) flock $LOCKDIR/$host wizbackup "$host:/" "$DEST/$host/" $opts >>$LOGFILE 2>&1 -- 2.25.1