From 6372cc4f99943a8b0865603d7871e7d79e4b8b4e Mon Sep 17 00:00:00 2001 From: Simon Paillard Date: Tue, 21 May 2013 16:42:50 +0200 Subject: RSYNC_OPTIONS and delete-method: fix regex for bash 3.2 Introduced by 8d734b614f2f6a33f71cc0 --- bin/ftpsync | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/ftpsync b/bin/ftpsync index 6c91970..9ac18ab 100755 --- a/bin/ftpsync +++ b/bin/ftpsync @@ -323,9 +323,11 @@ RSYNC_EXTRA=${RSYNC_EXTRA:-""} RSYNC_OPTIONS="${RSYNC_EXTRA} --bwlimit=${RSYNC_BW} ${RSYNC_OPTIONS}" # Finally, make sure RSYNC_OPTIONS2 has either --delete-after or --deleter-delay -if ! [[ ${RSYNC_OPTIONS2} =~ --delete-(after|delay) ]]; then +RSYNC_OPTION_REGEX="--delete-(after|delay)" +if ! [[ ${RSYNC_OPTIONS2} =~ ${RSYNC_OPTION_REGEX} ]]; then RSYNC_OPTIONS2+=" --delete-${RSYNC_DELETE_METHOD}" fi +unset RSYNC_OPTION_REGEX # We have no default host to sync from, but will error out if its unset RSYNC_HOST=${RSYNC_HOST:-""} -- cgit v1.2.3