From 23ee2bd74abd2a8b8dc6d76d531cd6863a07c62f Mon Sep 17 00:00:00 2001 From: Amber Date: Tue, 27 Jul 2021 09:47:01 +0200 Subject: [PATCH] sync after offline operations --- masync | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 }