2024-12-01 08:09:56 +01:00
|
|
|
#!/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
|
2024-12-01 08:26:38 +01:00
|
|
|
eval "npm run build"
|
2024-12-01 08:09:56 +01:00
|
|
|
done
|