From c56b1d6031f81ed1ae80a6a925fd632196b5186b Mon Sep 17 00:00:00 2001 From: deajan Date: Sun, 30 Sep 2018 13:51:06 +0200 Subject: [PATCH] Updated RSYNC_ARGS to recursive and non recursive styles --- dev/ofunctions.sh | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index 90a15d1..08c3ad4 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -7,8 +7,8 @@ #### OFUNCTIONS FULL SUBSET #### #### OFUNCTIONS MINI SUBSET #### -_OFUNCTIONS_VERSION=2.3.0-beta1 -_OFUNCTIONS_BUILD=2018080801 +_OFUNCTIONS_VERSION=2.3.0-RC1 +_OFUNCTIONS_BUILD=2018093001 #### _OFUNCTIONS_BOOTSTRAP SUBSET #### _OFUNCTIONS_BOOTSTRAP=true #### _OFUNCTIONS_BOOTSTRAP SUBSET END #### @@ -2120,8 +2120,8 @@ function InitRemoteOSDependingSettings { REMOTE_STAT_CTIME_MTIME_CMD="stat -c \\\"%n;%Z;%Y\\\"" fi - ## Set rsync default arguments - RSYNC_ARGS="-rltD -8" + ## Set rsync default arguments (complete with -r or -d depending on recursivity later) + RSYNC_DEFAULT_ARGS="ltD -8" if [ "$_DRYRUN" == true ]; then RSYNC_DRY_ARG="-n" DRY_WARNING="/!\ DRY RUN " @@ -2159,43 +2159,46 @@ function InitRemoteOSDependingSettings { fi if [ "$RSYNC_COMPRESS" == "yes" ]; then if [ "$LOCAL_OS" != "MacOSX" ] && [ "$REMOTE_OS" != "MacOSX" ]; then - RSYNC_ARGS=$RSYNC_ARGS" -zz --skip-compress=gz/xz/lz/lzma/lzo/rz/jpg/mp3/mp4/7z/bz2/rar/zip/sfark/s7z/ace/apk/arc/cab/dmg/jar/kgb/lzh/lha/lzx/pak/sfx" + RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" -zz --skip-compress=gz/xz/lz/lzma/lzo/rz/jpg/mp3/mp4/7z/bz2/rar/zip/sfark/s7z/ace/apk/arc/cab/dmg/jar/kgb/lzh/lha/lzx/pak/sfx" else Logger "Disabling compression skips on synchronization on [$LOCAL_OS] due to lack of support." "NOTICE" fi fi if [ "$COPY_SYMLINKS" == "yes" ]; then - RSYNC_ARGS=$RSYNC_ARGS" -L" + RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" -L" fi if [ "$KEEP_DIRLINKS" == "yes" ]; then - RSYNC_ARGS=$RSYNC_ARGS" -K" + RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" -K" fi if [ "$RSYNC_OPTIONAL_ARGS" != "" ]; then - RSYNC_ARGS=$RSYNC_ARGS" "$RSYNC_OPTIONAL_ARGS + RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" "$RSYNC_OPTIONAL_ARGS fi if [ "$PRESERVE_HARDLINKS" == "yes" ]; then - RSYNC_ARGS=$RSYNC_ARGS" -H" + RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" -H" fi if [ "$CHECKSUM" == "yes" ]; then RSYNC_TYPE_ARGS=$RSYNC_TYPE_ARGS" --checksum" fi if [ "$BANDWIDTH" != "" ] && [ "$BANDWIDTH" != "0" ]; then - RSYNC_ARGS=$RSYNC_ARGS" --bwlimit=$BANDWIDTH" + RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" --bwlimit=$BANDWIDTH" fi if [ "$PARTIAL" == "yes" ]; then - RSYNC_ARGS=$RSYNC_ARGS" --partial --partial-dir=\"$PARTIAL_DIR\"" + RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" --partial --partial-dir=\"$PARTIAL_DIR\"" RSYNC_PARTIAL_EXCLUDE="--exclude=\"$PARTIAL_DIR\"" fi if [ "$DELTA_COPIES" != "no" ]; then - RSYNC_ARGS=$RSYNC_ARGS" --no-whole-file" + RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" --no-whole-file" else - RSYNC_ARGS=$RSYNC_ARGS" --whole-file" + RSYNC_DEFAULT_ARGS=$RSYNC_DEFAULT_ARGS" --whole-file" fi # Set compression options again after we know what remote OS we are dealing with SetCompression + + RSYNC_DEFAULT_ARGS="-r $RSYNC_DEFAULT_ARGS" + RSYNC_DEFAULT_NONRECURSIVE_ARGS="-d $RSYNC_DEFAULT_ARGS" } ## IFS debug function