diff --git a/masync b/masync index c3f3ecd..dbbe6ef 100755 --- a/masync +++ b/masync @@ -161,6 +161,7 @@ startsyncpath() { snapshotfile=$(format ${SNAPSHOTFILE} hash=${localpath_hash}) #tempqueuefile=~/.syncdir_${localpath_hash}.queue tempqueuefile=$(format ${TMPQUEUEFILE} hash=${localpath_hash}) + #syncloopfile=$(format ${SYNCLOOPFILE} hash=${localpath_hash}) if [ -e ${snapshotfile} ]; then echo "Founded snapshot file: ${snapshotfile} checking files to remove..." @@ -169,6 +170,7 @@ startsyncpath() { rm -f ${snapshotfile} fi ## ensure local computer sends eventually new files adding a fake line in the queue + #echo -e "${PURPLE}[DUMMY PUSH]${ENDCOLOR} to remote" >> ${syncloopfile} echo "Startsync DUMMY ACTION" >> ${tempqueuefile} echo -e "${GREEN}DONE${ENDCOLOR}" loopsyncpath $1 diff --git a/syncloop.sh b/syncloop.sh index fe9c58c..7a8980c 100755 --- a/syncloop.sh +++ b/syncloop.sh @@ -72,7 +72,7 @@ synccycle() { while [ $ndeletes -gt 0 ]; do echo -e "${PURPLE}[DELETE]${ENDCOLOR} at remote: ${RED}$(head -n $ndeletes ${tmpqueuedeletes} | tr '\n', ' ')${ENDCOLOR}" ssh $REMOTEHOST "rm -rf $(head -n $ndeletes ${tmpqueuedeletes} | tr '\n', ' ')" - echo -e " ${PURPLE}[DONE]${ENDCOLOR}" + echo -e "${PURPLE}[DONE]${ENDCOLOR}" # remove the first ndeletes lines flock $lock_deletes tmpfile=$(mktemp) @@ -90,7 +90,7 @@ synccycle() { while [ $nqueue -gt 0 ]; do #echo "${tmpqueuefile} not empty consume ${nqueue} updates in queue" sync $LOCALPATH_HASH $LOCALPATH $REMOTEPATH - echo -e "${PURPLE}[DONE]${ENDCOLOR}" + echo -e "${PURPLE}[PUSH DONE]${ENDCOLOR}" # remove the first nqueue lines from queue flock $lock_queue tmpfile=$(mktemp)