aboutsummaryrefslogtreecommitdiffstats
path: root/squashfu
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2010-01-12 18:55:43 -0500
committerDave Reisner <d@falconindy.com>2010-01-12 18:55:43 -0500
commite8f59840164c5c9cc4ca7ffc4a934730de7b8601 (patch)
tree6e0f326a075e2955e03df45e898a674426843691 /squashfu
parent93a0e295797cab5bcd26cab6bce6a47e06b066e0 (diff)
downloadsquashfu-e8f59840164c5c9cc4ca7ffc4a934730de7b8601.tar.gz
Merge call_rsync into create_new_incremental
Diffstat (limited to 'squashfu')
-rwxr-xr-xsquashfu28
1 files changed, 7 insertions, 21 deletions
diff --git a/squashfu b/squashfu
index 3c55e0e..52d47eb 100755
--- a/squashfu
+++ b/squashfu
@@ -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