Fixes related to exclude-from file selection

This commit is contained in:
Ignacio Garcia-Vargas 2014-11-22 20:10:00 +01:00
parent f882af77ff
commit 275593b0d4
1 changed files with 6 additions and 3 deletions

View File

@ -750,15 +750,18 @@ function RsyncExcludePattern
function RsyncExcludeFrom function RsyncExcludeFrom
{ {
if [ ! $RSYNC_EXCLUDE_FROM == "" ] && [ -e $RSYNC_EXCLUDE_FROM ] if [ ! $RSYNC_EXCLUDE_FROM == "" ]
then then
## Check if the exclude list has a full path, and if not, add the config file path if there is one ## Check if the exclude list has a full path, and if not, add the config file path if there is one
if [ "$(basename $RSYNC_EXCLUDE_FROM)" == "$RSYNC_EXCLUDE_FROM" ] if [ "$(basename $RSYNC_EXCLUDE_FROM)" == "$RSYNC_EXCLUDE_FROM" ]
then then
$RSYNC_EXCLUDE_FROM=$(dirname $cfgfile)/$RSYNC_EXCLUDE_FROM RSYNC_EXCLUDE_FROM=$(dirname $ConfigFile)/$RSYNC_EXCLUDE_FROM
fi fi
RSYNC_EXCLUDE="$RSYNC_EXCLUDE --exclude-from=\"$RSYNC_EXCLUDE_FROM\"" if [ -e $RSYNC_EXCLUDE_FROM ]
then
RSYNC_EXCLUDE="$RSYNC_EXCLUDE --exclude-from=\"$RSYNC_EXCLUDE_FROM\""
fi
fi fi
} }