mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
17 lines
367 B
Bash
Executable file
17 lines
367 B
Bash
Executable file
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
BLOG_TARGET=${BLOG_TARGET:-mudge}
|
|
|
|
if ! command -v inotifywait >/dev/null 2>/dev/null; then
|
|
echo "inotifywait is required (install inotify-tools)."
|
|
exit 1
|
|
fi
|
|
|
|
while true; do
|
|
inotifywait -e modify,create,delete,move -r public -r posts -r lib
|
|
echo "changed at $(date)"
|
|
sleep 2
|
|
rbenv exec bundle exec bake "$BLOG_TARGET"
|
|
done
|