]> git.somenet.org - somenet/homesync.git/blob - homeload.sh
rewrite homestore to use better options.
[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 -vapP --delete --sparse --exclude='/.**' --exclude='/Downloads' --exclude='/VirtualBox VMs/*.nosync' \
16         --exclude='/sync.opera/cache/**' --exclude='/sync.opera/application_cache/**' --exclude='/sync.opera/icons/**' --exclude='/Nextcloud' \
17         "home.somenet.org:HOMESYNC_DATA/" "${HOME}/"
18 else
19   rsync -vapPx --delete --sparse --exclude='/.**' --exclude='/Downloads' --exclude='/VirtualBox VMs/*.nosync' \
20         --exclude='/sync.opera/cache/**' --exclude='/sync.opera/application_cache/**' --exclude='/sync.opera/icons/**' --exclude='/Nextcloud' \
21         "home.somenet.org:HOMESYNC_DATA/" "${HOME}/"
22 fi
23