#!/bin/sh
#
# entr-refresh - rerun "command" when files change in repo
# restart every time a new file is added
#
# ---
# see: https://jvns.ca/blog/2020/06/28/entr

set -eu

while true; do
  {
    git ls-files
    git ls-files . --exclude-standard --others
  } | entr -d "$@"
done
