]> git.somenet.org - somenet/homesync.git/blob - homeload.sh
Added option CROSSFS to enable filesystem boundary crossing on sync.
[somenet/homesync.git] / homeload.sh
1 #!/bin/bash
2
3 SLEEPTIME=5
4 echo "Will sync ${HOME} FROM server in ${SLEEPTIME} sec..."
5
6 if [[ "$1" == "CROSSFS" ]] ; then
7   echo "CROSSFS sync enabled! This could be DANGEROUS!"
8 else
9   echo "CROSSFS sync disabled."
10 fi
11
12 sleep $SLEEPTIME
13
14 if [[ "$1" == "CROSSFS" ]] ; then
15   rsync -aHAvpP --delete --sparse --exclude='/.**' --exclude='/Downloads' \
16         --exclude='/sync.opera/cache/**' --exclude='/sync.opera/application_cache/**' --exclude='/sync.opera/icons/**' \
17         -e 'ssh -p666' "homesync.somenet.org:HOMESYNC_DATA/" "${HOME}/"
18 else
19   rsync -axHAvpP --delete --sparse --exclude='/.**' --exclude='/Downloads' \
20         --exclude='/sync.opera/cache/**' --exclude='/sync.opera/application_cache/**' --exclude='/sync.opera/icons/**' \
21         -e 'ssh -p666' "homesync.somenet.org:HOMESYNC_DATA/" "${HOME}/"
22 fi
23