Last active
November 17, 2019 16:11
-
-
Save littlebenlittle/3867e9cca69d12c07ebfc6a216854264 to your computer and use it in GitHub Desktop.
Sync files to a cloud VM
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
LOCAL_DIR=$1 | |
REMOTE_DIR=$2 | |
DEV_IP=$3 | |
while inotifywait -e modify -e create --exclude '/\..+' -r $LOCAL_DIR; do | |
rsync -avz --exclude '/\..+' $LOCAL_DIR $USER@$DEV_IP:$REMOTE_DIR | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment