From be7d068676ba7b23217624d4f0a2aba27d5119c0 Mon Sep 17 00:00:00 2001 From: Someone Date: Thu, 7 May 2015 05:59:31 +0200 Subject: [PATCH] Added option CROSSFS to enable filesystem boundary crossing on sync. --- homeload.sh | 20 +++++++++++++++++--- homestore.sh | 19 ++++++++++++++++--- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/homeload.sh b/homeload.sh index 3458546..82500cb 100755 --- a/homeload.sh +++ b/homeload.sh @@ -2,8 +2,22 @@ SLEEPTIME=5 echo "Will sync ${HOME} FROM server in ${SLEEPTIME} sec..." + +if [[ "$1" == "CROSSFS" ]] ; then + echo "CROSSFS sync enabled! This could be DANGEROUS!" +else + echo "CROSSFS sync disabled." +fi + sleep $SLEEPTIME -rsync -aHAxvpP --delete --sparse --exclude='/.**' --exclude='/Downloads' \ - --exclude='/sync.opera/cache/**' --exclude='/sync.opera/application_cache/**' --exclude='/sync.opera/icons/**' \ - -e 'ssh -p666' "homesync.somenet.org:HOMESYNC_DATA/" "${HOME}/" + +if [[ "$1" == "CROSSFS" ]] ; then + rsync -aHAvpP --delete --sparse --exclude='/.**' --exclude='/Downloads' \ + --exclude='/sync.opera/cache/**' --exclude='/sync.opera/application_cache/**' --exclude='/sync.opera/icons/**' \ + -e 'ssh -p666' "homesync.somenet.org:HOMESYNC_DATA/" "${HOME}/" +else + rsync -axHAvpP --delete --sparse --exclude='/.**' --exclude='/Downloads' \ + --exclude='/sync.opera/cache/**' --exclude='/sync.opera/application_cache/**' --exclude='/sync.opera/icons/**' \ + -e 'ssh -p666' "homesync.somenet.org:HOMESYNC_DATA/" "${HOME}/" +fi diff --git a/homestore.sh b/homestore.sh index 6832212..b65a2e7 100755 --- a/homestore.sh +++ b/homestore.sh @@ -2,8 +2,21 @@ SLEEPTIME=5 echo "Will sync ${HOME} TO server in ${SLEEPTIME} sec..." + +if [[ "$1" == "CROSSFS" ]] ; then + echo "CROSSFS sync enabled! This could be DANGEROUS!" +else + echo "CROSSFS sync disabled." +fi + sleep $SLEEPTIME -rsync -aHAxvpP --delete --sparse --exclude='/.**' --exclude='/Downloads' \ - --exclude='/sync.opera/cache/**' --exclude='/sync.opera/application_cache/**' --exclude='/sync.opera/icons/**' \ - "${HOME}/" -e 'ssh -p666' "homesync.somenet.org:HOMESYNC_DATA/" +if [[ "$1" == "CROSSFS" ]] ; then + rsync -aHAvpP --delete --sparse --exclude='/.**' --exclude='/Downloads' \ + --exclude='/sync.opera/cache/**' --exclude='/sync.opera/application_cache/**' --exclude='/sync.opera/icons/**' \ + "${HOME}/" -e 'ssh -p666' "homesync.somenet.org:HOMESYNC_DATA/" +else + rsync -axHAvpP --delete --sparse --exclude='/.**' --exclude='/Downloads' \ + --exclude='/sync.opera/cache/**' --exclude='/sync.opera/application_cache/**' --exclude='/sync.opera/icons/**' \ + "${HOME}/" -e 'ssh -p666' "homesync.somenet.org:HOMESYNC_DATA/" +fi -- 2.43.0