diff options
-rwxr-xr-x | squashfu | 28 |
1 files changed, 7 insertions, 21 deletions
@@ -91,7 +91,13 @@ create_new_incremental () { return 1; fi - call_rsync + INCLUDES=($(sed -n '/^<<INCLUDES$/,/^INCLUDES$/p' $CONFIG | grep -vE "^<*INCLUDES$")) + EXCLUDES=($(sed -n '/^<<EXCLUDES$/,/^EXCLUDES$/p' $CONFIG | \ + grep -vE "^<*EXCLUDES$" | \ + sed -n 's/\(.*\)/--exclude "\1"/p')) + + debug "rsync ${RSYNC_OPTS[@]} ${INCLUDES[@]} ${EXCLUDES[@]} "$UNION_MOUNT"" + /usr/bin/rsync ${RSYNC_OPTS[@]} ${INCLUDES[@]} ${EXCLUDES[@]} "$UNION_MOUNT" return $? } @@ -154,26 +160,6 @@ sweep_bins () { } -call_rsync () { -# Arguments: none -# Returns: return code from rsync - - # Parse includes and excludes from heredocs in config - INCLUDES=($(sed -n '/^<<INCLUDES$/,/^INCLUDES$/p' $CONFIG | grep -vE "^<*INCLUDES$")) - EXCLUDES=($(sed -n '/^<<EXCLUDES$/,/^EXCLUDES$/p' $CONFIG | \ - grep -vE "^<*EXCLUDES$" | \ - sed -n 's/\(.*\)/--exclude "\1"/p')) - - # rsync source to $BKUP_ROOT/rw -# debug "Rsync executing with:" -# debug ": Options: ${RSYNC_OPTS[@]}" -# debug ": Includes: ${INCLUDES[@]}" -# debug ": Excludes: ${EXCLUDES[@]}" - debug "rsync ${RSYNC_OPTS[@]} ${INCLUDES[@]} ${EXCLUDES[@]} "$UNION_MOUNT"" - /usr/bin/rsync ${RSYNC_OPTS[@]} ${INCLUDES[@]} ${EXCLUDES[@]} "$UNION_MOUNT" - return $? -} - create_new_bin () { # Arguments: 1, the number of the bin to create # Returns: 0 on success, non-zero on error |