Created
February 11, 2019 14:15
-
-
Save bdowling/de52b4ba58cd8aec3dfe04ee0b73c5d5 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/sh | |
# | |
# Simple script to watch a source folder for changes and run rsync on demand as changes occur | |
# | |
SRC=$1 | |
DEST=$2 | |
while true; do | |
inotifywait --exclude=.git -r --event=modify,create,move,delete $SRC && rsync -Pav --exclude=.git $SRC $DEST | |
sleep 5; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment