diff options
author | Dave Reisner <d@falconindy.com> | 2010-01-12 18:55:43 -0500 |
---|---|---|
committer | Dave Reisner <d@falconindy.com> | 2010-01-12 18:55:43 -0500 |
commit | e8f59840164c5c9cc4ca7ffc4a934730de7b8601 (patch) | |
tree | 6e0f326a075e2955e03df45e898a674426843691 /squashfu | |
parent | 93a0e295797cab5bcd26cab6bce6a47e06b066e0 (diff) | |
download | squashfu-e8f59840164c5c9cc4ca7ffc4a934730de7b8601.tar.gz |
Merge call_rsync into create_new_incremental
Diffstat (limited to 'squashfu')
-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 |