Improved the exclude option.

This commit is contained in:
Llewellyn van der Merwe 2020-03-07 23:03:19 +02:00
parent 228020f584
commit 081d5b2456
No known key found for this signature in database
GPG Key ID: 8A8F406BA7238C4E
1 changed files with 2 additions and 2 deletions

View File

@ -483,7 +483,7 @@ function syncFolder() {
# make tmp dir
mkdir "$tmpPath"
# move file/folders out to tmp folder
for line in $(cat ${EXCLUDEPATH}${HASH}); do mv -f "${target_folder}/${line}" "$tmpPath"; done
for line in $(cat ${EXCLUDEPATH}${HASH}); do mv -f $target_folder/$line $tmpPath; done
fi
# we use rsync to do all the sync work (very smart)
rsync -qrd --delete "${source_folder}/" "${target_folder}"
@ -501,7 +501,7 @@ function syncFolder() {
# move the files back
if [ -f "${EXCLUDEPATH}${HASH}" ]; then
# move file/folders out
for line in $(cat ${EXCLUDEPATH}${HASH}); do mv -f "$tmpPath/$line" "${target_folder}"; done
for line in $(cat ${EXCLUDEPATH}${HASH}); do mv -f $tmpPath/$line $target_folder; done
# remove tmp dir
rm -r "$tmpPath"
fi