Coped with really old TODO fixing rsyncpatterns when path separator isn't semicolon

This commit is contained in:
deajan 2016-12-03 09:39:09 +01:00
parent 569d5f63a2
commit 88b135118d
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#### MINIMAL-FUNCTION-SET BEGIN #### #### MINIMAL-FUNCTION-SET BEGIN ####
## FUNC_BUILD=2016120102 ## FUNC_BUILD=2016120301
## BEGIN Generic bash functions written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr ## BEGIN Generic bash functions written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr
## To use in a program, define the following variables: ## To use in a program, define the following variables:
@ -1384,13 +1384,13 @@ function RsyncPatternsAdd {
while [ -n "$rest" ] while [ -n "$rest" ]
do do
# Take the string until first occurence until $PATH_SEPARATOR_CHAR # Take the string until first occurence until $PATH_SEPARATOR_CHAR
str=${rest%%;*} #TODO: replace ; with $PATH_SEPARATOR_CHAR str="${rest%%$PATH_SEPARATOR_CHAR*}"
# Handle the last case # Handle the last case
if [ "$rest" = "${rest/$PATH_SEPARATOR_CHAR/}" ]; then if [ "$rest" = "${rest/$PATH_SEPARATOR_CHAR/}" ]; then
rest= rest=
else else
# Cut everything before the first occurence of $PATH_SEPARATOR_CHAR # Cut everything before the first occurence of $PATH_SEPARATOR_CHAR
rest=${rest#*$PATH_SEPARATOR_CHAR} rest="${rest#*$PATH_SEPARATOR_CHAR}"
fi fi
if [ "$RSYNC_PATTERNS" == "" ]; then if [ "$RSYNC_PATTERNS" == "" ]; then
RSYNC_PATTERNS="--"$patternType"=\"$str\"" RSYNC_PATTERNS="--"$patternType"=\"$str\""