From 275593b0d482adb44c2f1f66954356aca600b2d9 Mon Sep 17 00:00:00 2001 From: Ignacio Garcia-Vargas Date: Sat, 22 Nov 2014 20:10:00 +0100 Subject: [PATCH] Fixes related to exclude-from file selection --- osync.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/osync.sh b/osync.sh index 73ad720..2d84ee6 100755 --- a/osync.sh +++ b/osync.sh @@ -750,15 +750,18 @@ function RsyncExcludePattern function RsyncExcludeFrom { - if [ ! $RSYNC_EXCLUDE_FROM == "" ] && [ -e $RSYNC_EXCLUDE_FROM ] + if [ ! $RSYNC_EXCLUDE_FROM == "" ] then ## 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" ] then - $RSYNC_EXCLUDE_FROM=$(dirname $cfgfile)/$RSYNC_EXCLUDE_FROM + RSYNC_EXCLUDE_FROM=$(dirname $ConfigFile)/$RSYNC_EXCLUDE_FROM 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 }