diff --git a/masync b/masync index 3fe5756..d4799cb 100755 --- a/masync +++ b/masync @@ -112,6 +112,7 @@ startsyncpath() { echo -e "Starting mirror local folder ${GREEN}$1${ENDCOLOR} with remote ${GREEN}$2${ENDCOLOR}..." localpath_hash=$(echo "$1" | md5sum | cut -f1 --delimiter=" " -) snapshotfile=${SNAPSHOTFILE}${localpath_hash} + tempqueuefile=~/.syncdir_${localpath_hash}.queue if [ -e ${snapshotfile} ]; then echo "Founded snapshot file: ${snapshotfile} collect files to delete in origin" @@ -119,7 +120,8 @@ startsyncpath() { echo "Remove snapshot file ${snapshotfile}" rm -f ${snapshotfile} fi - #sync $localpath_hash $2 $1 '--delete' + ## ensure local computer sends eventually new files adding a fake line in the queue + echo "Add notify dummy action in queue on startsync" | tee -a ${tempqueuefile} echo -e "Mirrorring ${GREEN}done${ENDCOLOR}" loopsyncpath $1 }