Gestion of spaces in paths for exclude list too.

This commit is contained in:
Zertrin 2012-05-10 20:39:14 +02:00
parent 37b35a499b
commit 5f0b38454c

View file

@ -136,8 +136,8 @@ EMAIL_TO=
EMAIL_FROM= EMAIL_FROM=
EMAIL_SUBJECT= EMAIL_SUBJECT=
# command to use to send mail (uncomment to activate functionnality) # command to use to send mail
#MAIL="mailx" MAIL="mailx"
#MAIL="ssmtp" #MAIL="ssmtp"
# TROUBLESHOOTING: If you are having any problems running this script it is # TROUBLESHOOTING: If you are having any problems running this script it is
@ -333,16 +333,18 @@ include_exclude()
IFS=$(echo -en "\t\n") IFS=$(echo -en "\t\n")
for include in ${INCLIST[@]} for include in ${INCLIST[@]}
do do
TMP=" --include=""'"$include"'" TMP=" --include=""'"$include"'"
INCLUDE=$INCLUDE$TMP INCLUDE=$INCLUDE$TMP
done done
for exclude in ${EXCLIST[@]} for exclude in ${EXCLIST[@]}
do do
TMP=" --exclude "$exclude TMP=" --exclude ""'"$exclude"'"
EXCLUDE=$EXCLUDE$TMP EXCLUDE=$EXCLUDE$TMP
done done
EXCLUDEROOT="--exclude=**"
EXCLUDEROOT="--exclude=**"
# Restore IFS # Restore IFS
IFS=$OLDIFS IFS=$OLDIFS