Created
May 22, 2014 22:07
-
-
Save pmig/b88efca2fa54a6901cdc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| # pmig.at | |
| # this skript uses zsh + .oh-my-zsh shortcuts (check them out - they are awesome anyway) | |
| usage () { | |
| echo "USE IT:" | |
| echo "zsh auto-rsync LOCALFOLDER REMOTE PATH" | |
| echo "e.g. \"zsh auto-rsync test me@mytestsever:parentfortest\"" | |
| exit | |
| } | |
| if [ -z "$1" ] || [ -z "$2" ]; then | |
| usage | |
| fi | |
| AR_homefolder=$1 | |
| AR_remotefolder=$2 | |
| while (true) { | |
| rsync -azvv --exclude='.*' -e ssh $AR_homefolder $AR_remotefolder | |
| sleep 2 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment