14 lines
370 B
Bash
Executable file
14 lines
370 B
Bash
Executable file
#!/usr/bin/env sh
|
|
|
|
if [ -z "$(which inotifywait)" ]; then
|
|
echo "inotifywait not installed."
|
|
echo "In most distros, it is available in the inotify-tools package."
|
|
exit 1
|
|
fi
|
|
|
|
inotifywait --recursive --monitor --format "%e %w%f" \
|
|
--event modify,move,create,delete ./content ./layouts \
|
|
| while read changed; do
|
|
echo $changed
|
|
eval "npm run build"
|
|
done
|