projects
/
wizbackup.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f8bf765
)
Make the EXCLUDES/ALWAYS file optional
author
Bernie Innocenti
<bernie@codewiz.org>
Tue, 11 Oct 2011 03:33:47 +0000
(23:33 -0400)
committer
root
<root@housetree.sugarlabs.org>
Tue, 11 Oct 2011 03:34:23 +0000
(23:34 -0400)
wizbackup-driver
patch
|
blob
|
history
diff --git
a/wizbackup-driver
b/wizbackup-driver
index 1a5d0bc8bb06f24b0233ba46f7d0219e27a87ceb..6fbc2fdd2c257eb393d2668d1e99b104f7729638 100755
(executable)
--- 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