Skip to content

Instantly share code, notes, and snippets.

@andreif
Created August 21, 2018 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreif/8d524325c6f4b9bd092f279c5e13d14a to your computer and use it in GitHub Desktop.
Save andreif/8d524325c6f4b9bd092f279c5e13d14a to your computer and use it in GitHub Desktop.
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