diff --git a/bin/watch-changes b/bin/watch-changes new file mode 100755 index 0000000..ad8cb2e --- /dev/null +++ b/bin/watch-changes @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +if [[ "$1" == "" || "$2" == "" ]]; then + echo "usage: ${0##*/} "; + exit 2; +fi + +set -euo pipefail + +while true; do + inotifywait \ + --event modify \ + --event move_self \ + --recursive \ + $1 && $2 +done