#!/bin/env bash

if [[ $(hostname) != "ladd76" ]]; then
  echo >&2 "host $(hostname) != 'ladd76'"
  exit 1
fi

set -eo pipefail

do_rsync() {
  rsync -vru \
    --exclude='.git' \
    --exclude='node_modules' \
    --exclude='.*.sw*' \
    "$@"
}

do_rsync ~/code/gravity-dev/ lentilz:code/gravity-dev/
# do_rsync lentilz:code/gravity-dev/ ~/code/gravity-dev/ 

git status

echo >&2
echo >&2 "Synced with https://gravity.dev.laddhoffman.com"
