Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
#
# DEPENDS ON: dialog, fswatch, rsync, ssh
#
# This script uses fswatch to monitor a directory for changes and when changes are detected
# Runs rsync to sync the changes to a remote server
#
# Features:
# - prompt for initial sync from remote server
# - delay after rsync to make sure it doesn't run too frequently