From: Bernie Innocenti Date: Tue, 11 Oct 2011 03:33:47 +0000 (-0400) Subject: Make the EXCLUDES/ALWAYS file optional X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=8c5171836be85d47ed5399447c75167d9eb58399;p=wizbackup.git Make the EXCLUDES/ALWAYS file optional --- 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