Added support for summary

This commit is contained in:
Nico Schottelius 2006-01-24 21:46:49 +01:00
parent 6f3c98917a
commit 083b5e4d06
2 changed files with 14 additions and 7 deletions

View File

@ -15,8 +15,8 @@ CPOSTEXEC="$CDEFAULTS/post_exec"
TMP=$(mktemp /tmp/$(basename $0).XXXXXX) TMP=$(mktemp /tmp/$(basename $0).XXXXXX)
WE=$(basename $0) WE=$(basename $0)
VERSION=0.3 VERSION=0.3.1
RELEASE="2006-01-22" RELEASE="2006-XX-XX"
# #
# unset parallel execution # unset parallel execution
@ -206,6 +206,7 @@ while [ "$i" -lt "$no_shares" ]; do
c_verbose="$backup/verbose" c_verbose="$backup/verbose"
c_vverbose="$backup/very_verbose" c_vverbose="$backup/very_verbose"
c_rsync_extra="$backup/rsync_options" c_rsync_extra="$backup/rsync_options"
c_summary="$backup/summary"
c_pre_exec="$backup/pre_exec" c_pre_exec="$backup/pre_exec"
c_post_exec="$backup/post_exec" c_post_exec="$backup/post_exec"
@ -239,12 +240,13 @@ while [ "$i" -lt "$no_shares" ]; do
fi fi
# #
# standard rsync options # unset possible options
# #
VERBOSE=""
VVERBOSE=""
EXCLUDE="" EXCLUDE=""
RSYNC_EXTRA="" RSYNC_EXTRA=""
SUMMARY=""
VERBOSE=""
VVERBOSE=""
# #
# next configuration checks # next configuration checks
@ -289,6 +291,11 @@ while [ "$i" -lt "$no_shares" ]; do
VERBOSE="-v" VERBOSE="-v"
fi fi
# Output a summary
if [ -f "$c_summary" ]; then
SUMMARY="--stats"
fi
# MORE verbosity, includes standard verbosity # MORE verbosity, includes standard verbosity
if [ -f "$c_vverbose" ]; then if [ -f "$c_vverbose" ]; then
VERBOSE="-v" VERBOSE="-v"
@ -349,7 +356,7 @@ while [ "$i" -lt "$no_shares" ]; do
echo "Transferring files..." echo "Transferring files..."
rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE \ rsync -a $VERBOSE $RSYNC_EXTRA $EXCLUDE $SUMMARY \
--delete --numeric-ids --relative --delete-excluded \ --delete --numeric-ids --relative --delete-excluded \
"$source" "$destination_dir" "$source" "$destination_dir"

View File

@ -749,7 +749,7 @@ srwali01:/etc/ccollect/sources# du -sh /mnt/hdbackup/wl6/*
<div id="footer"> <div id="footer">
<div id="footer-text"> <div id="footer-text">
Version 0.3.0<br /> Version 0.3.0<br />
Last updated 22-Jan-2006 13:26:51 CEST Last updated 22-Jan-2006 13:32:34 CEST
</div> </div>
</div> </div>
</body> </body>