dotfiles/bin/watch-changes
Oliver Davies 017973b0b4 fix: incorrect shebang
Fails on NixOS before making this change.
2023-04-08 09:45:07 +01:00

12 lines
220 B
Bash
Executable file

#!/usr/bin/env bash
if [ "$1" ] && [ "$2" ]; then
while true
do
inotifywait --event modify --exclude ".null-ls_*" --recursive $1 2> /dev/null
$2
done
else
echo "usage: watch-changes <file> <command>"
fi