12 lines
212 B
Plaintext
12 lines
212 B
Plaintext
|
#!/bin/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
|