Begin reordering options
This commit is contained in:
parent
ed91b488da
commit
e92bd762d4
1 changed files with 17 additions and 27 deletions
44
ccollect.sh
44
ccollect.sh
|
@ -329,7 +329,11 @@ while [ "$i" -lt "$no_sources" ]; do
|
||||||
# - insert options
|
# - insert options
|
||||||
# - insert user options
|
# - insert user options
|
||||||
|
|
||||||
|
#
|
||||||
|
# rsync standard options
|
||||||
|
#
|
||||||
|
|
||||||
|
ouropts="-a --delete --numeric-ids --relative --delete-excluded"
|
||||||
#
|
#
|
||||||
# exclude list
|
# exclude list
|
||||||
#
|
#
|
||||||
|
@ -337,35 +341,29 @@ while [ "$i" -lt "$no_sources" ]; do
|
||||||
set -- "$@" "--exclude-from=$c_exclude"
|
set -- "$@" "--exclude-from=$c_exclude"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
|
||||||
# extra options for rsync
|
|
||||||
#
|
|
||||||
if [ -f "${c_rsync_extra}" ]; then
|
|
||||||
while read line; do
|
|
||||||
set -- "$@" "$line"
|
|
||||||
RSYNC_EXTRA="$(cat "${c_rsync_extra}")"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Output a summary
|
# Output a summary
|
||||||
#
|
#
|
||||||
if [ -f "${c_summary}" ]; then
|
if [ -f "${c_summary}" ]; then
|
||||||
SUMMARY="--stats"
|
set -- "$@" "--stats"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Verbosity for rsync
|
# Verbosity for rsync
|
||||||
#
|
#
|
||||||
if [ -f "${c_verbose}" ]; then
|
if [ -f "${c_vverbose}" ]; then
|
||||||
VERBOSE="-v"
|
set -- "$@" "-vv"
|
||||||
|
elif [ -f "${c_verbose}" ]; then
|
||||||
|
set -- "$@" "-v"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# MORE verbosity, includes standard verbosity
|
# extra options for rsync provided by the user
|
||||||
#
|
#
|
||||||
if [ -f "${c_vverbose}" ]; then
|
if [ -f "${c_rsync_extra}" ]; then
|
||||||
VERBOSE="-v"
|
while read line; do
|
||||||
VVERBOSE="-v"
|
set -- "$@" "$line"
|
||||||
|
done < "${c_rsync_extra}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# #
|
# #
|
||||||
|
@ -447,25 +445,17 @@ while [ "$i" -lt "$no_sources" ]; do
|
||||||
abs_destination_dir="$(cd "$destination_dir" && pwd -P)"
|
abs_destination_dir="$(cd "$destination_dir" && pwd -P)"
|
||||||
|
|
||||||
#
|
#
|
||||||
# FIXME: add mark in 0.6 (and remove if successful later!
|
# added mark in 0.6 (and remove it, if successful later)
|
||||||
#
|
#
|
||||||
#touch "${abs_destination_dir}/${c_marker}"
|
touch "${abs_destination_dir}/${c_marker}"
|
||||||
|
|
||||||
#
|
#
|
||||||
# the rsync part
|
# the rsync part
|
||||||
# options partly stolen from rsnapshot
|
# options partly stolen from rsnapshot
|
||||||
#
|
#
|
||||||
|
|
||||||
echo "$($DDATE) Transferring files..."
|
_techo "Transferring files..."
|
||||||
|
|
||||||
ouropts="-a --delete --numeric-ids --relative --delete-excluded"
|
|
||||||
|
|
||||||
#
|
|
||||||
# FIXME: check, whether this is broken with spaces...
|
|
||||||
# most likely it should be broken...MUST be...
|
|
||||||
# expanding depens on shell (zsh = 1, dash = 3 arguments in test case)
|
|
||||||
#
|
|
||||||
useropts="$VERBOSE $EXCLUDE $SUMMARY $RSYNC_EXTRA"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# FIXME:useropts / rsync extra: one parameter per line!
|
# FIXME:useropts / rsync extra: one parameter per line!
|
||||||
|
|
Loading…
Reference in a new issue