nixite/testing/watch.nix

11 lines
187 B
Nix
Raw Normal View History

2024-01-02 04:01:19 +00:00
pkgs: cmd: pname:
pkgs.writeShellScriptBin "watch" ''
while true
do
${cmd} &
2024-01-02 08:51:27 +00:00
${pkgs.inotify-tools}/bin/inotifywait -e modify -r . --exclude .git
2024-01-02 04:01:19 +00:00
pkill ${pname}
done
''