Skip to content

Instantly share code, notes, and snippets.

View tdmalone's full-sized avatar

Tim Malone tdmalone

View GitHub Profile
@tdmalone
tdmalone / static-site-watch.sh
Last active June 17, 2021 08:03 — forked from senko/onchange.sh
Watch specified directory recursively for file changes, and sync it to S3 when anything is created, modified, moved or deleted. Designed for use with a static site generator.
#!/usr/bin/env bash
#
# Watch specified directory recursively for file changes, and sync it to S3 when anything is
# created, modified, moved or deleted. Designed for use with a static site generator.
#
# Originally based on a script by Senko Rasic <senko.rasic@dobarkod.hr>
# Modified by Tim Malone <tdmalone@gmail.com>
# Ideas included from Lambros Petrou <lambrospetrou@gmail.com>
# Released to public domain.
# See https://gist.github.com/senko/1154509