From 5f0b38454cfe08af0ac542165aff8ea0be9d408c Mon Sep 17 00:00:00 2001 From: Zertrin Date: Thu, 10 May 2012 20:39:14 +0200 Subject: [PATCH] Gestion of spaces in paths for exclude list too. --- duplicity-backup.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/duplicity-backup.sh b/duplicity-backup.sh index 0bf880b..851128f 100755 --- a/duplicity-backup.sh +++ b/duplicity-backup.sh @@ -136,8 +136,8 @@ EMAIL_TO= EMAIL_FROM= EMAIL_SUBJECT= -# command to use to send mail (uncomment to activate functionnality) -#MAIL="mailx" +# command to use to send mail +MAIL="mailx" #MAIL="ssmtp" # TROUBLESHOOTING: If you are having any problems running this script it is @@ -333,16 +333,18 @@ include_exclude() IFS=$(echo -en "\t\n") for include in ${INCLIST[@]} - do - TMP=" --include=""'"$include"'" - INCLUDE=$INCLUDE$TMP + do + TMP=" --include=""'"$include"'" + INCLUDE=$INCLUDE$TMP done + for exclude in ${EXCLIST[@]} - do - TMP=" --exclude "$exclude - EXCLUDE=$EXCLUDE$TMP - done - EXCLUDEROOT="--exclude=**" + do + TMP=" --exclude ""'"$exclude"'" + EXCLUDE=$EXCLUDE$TMP + done + + EXCLUDEROOT="--exclude=**" # Restore IFS IFS=$OLDIFS