Created
December 2, 2015 08:36
-
-
Save xcodebuild/85494ead99551ae93ad4 to your computer and use it in GitHub Desktop.
fswatch + rsync.
This file contains 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
#!/usr/bin/env sh | |
# | |
# Description: | |
# Make your local folder to remote server synchronization. | |
# Requirements: | |
# brew install fswatch | |
SRC=/Users/liuxd/Documents/guess_cheat_new/ | |
[email protected]:/home/liuxidong/project/cheat/ | |
EXCLUDE=/Users/liuxd/Downloads/rsync-exlcude.txt | |
fswatch $SRC | while read ev | |
do | |
if [ -e $ev ];then | |
rsync -av --delete --exclude-from=$EXCLUDE $SRC $DES | |
fi | |
done | |
# end of this file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment