From: Michael Wallner Date: Thu, 22 Nov 2018 16:33:35 +0000 (+0100) Subject: paranoid watcher X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=commitdiff_plain;h=5f4abb70454abc62e885f4119339aaad2e5eeb1c;hp=036752dbbcb77494de9935ac459ea5cf0ea34b4b paranoid watcher --- diff --git a/Makefile.frag b/Makefile.frag index a9f6035..f68503f 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -89,10 +89,15 @@ endif .PHONY: psi-paranoid-backups psi-paranoid-backups: - -if test -z "$((DEST))"; then \ - echo "Usage: make psi-paranoid-backups DEST="; \ + @-if test -z "$(REPO)"; then \ + echo; \ + echo "Usage: make psi-paranoid-backups REPO="; \ + echo; \ else \ - git ci -am flush; \ - git push $DEST; \ + echo "Watching $(PHP_PSI_SRCDIR) for changes to flush and push to $(REPO)"; \ + while inotifywait -q -e modify -r $(PHP_PSI_SRCDIR); do \ + git ci -am flush; \ + git push $(REPO); \ + done; \ fi