Created
August 21, 2018 10:21
-
-
Save andreif/8d524325c6f4b9bd092f279c5e13d14a to your computer and use it in GitHub Desktop.
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
if [ $# -eq 0 ]; then | |
echo "No arguments supplied" | |
return | |
fi | |
LOCAL="/Users/andrei/Project/src/$1/" | |
REMOTE="andrei@10.0.0.1:~/src/$1" | |
RSYNC="rsync -avzr --exclude=.git --exclude=ENV --exclude=dist" | |
FSWATCH='fswatch -0rl 3 --exclude=".*\.git.*" --exclude=".*___jb_.*"' | |
$RSYNC --delete $LOCAL $REMOTE | |
$FSWATCH $LOCAL | while read -d "" event; do | |
echo $event | |
$RSYNC $LOCAL $REMOTE | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment