Last active
May 7, 2018 00:03
-
-
Save tommystanton/5ec743bdbe915991d1b4d2d512a678c7 to your computer and use it in GitHub Desktop.
Automatically run tests when a source file is modified (Perl 6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while inotifywait \ | |
--quiet --quiet \ | |
--recursive \ | |
--event close_write \ | |
lib/ @lib/.precomp/ bin/ t/; do \ | |
clear; \ | |
prove --exec perl6 --lib --verbose; \ | |
done |
I believe one way to achieve the same setup using entr(1)
is something like:
$ ls bin/* lib/*.pm6 t/*.t | entr -cr prove --exec perl6 -v
Also, replacing the ls ...
idea with git ls-tree --name-only -r HEAD
may also prove useful.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Another CLI program that I've come across, as an alternative to
inotifywait(1)
, isentr(1)
. Seems more straightforward.