sync after offline operations

This commit is contained in:
Amber 2021-07-27 09:47:01 +02:00
parent 0b3e30ec9b
commit 23ee2bd74a

4
masync
View File

@ -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
}