nixite/testing/watch.nix

11 lines
172 B
Nix
Raw Normal View History

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