~paravoid/subjective.work

68a325a1120a4e5516b577b8c12bff3d8b485505 — paravoid 2 years ago df6c9f5
build: Start busybox httpd when in watch mode
1 files changed, 4 insertions(+), 2 deletions(-)

M build.sh
M build.sh => build.sh +4 -2
@@ 17,7 17,7 @@ gen() {
			dst="pub/$html"
			if [ "$src" -nt "$dst" ]
			then
				echo Generating $dst
				echo "Generating $dst"
				pandoc -c "/style.css" -s "$src" -o "$dst"
			fi
		else


@@ 33,12 33,14 @@ gen() {

arc() {
	arcname="site.tar.gz"
	echo Generating "$arcname"
	echo "Generating $arcname"
	tar -C pub -cz . > "$arcname"
}

if [ "$1" = "-w" ]
then
	trap 'kill $(jobs -p)' EXIT
	busybox httpd -h pub/ -fvp 0.0.0.0:8080 &
	while true
	do
		inotifywait -e modify,create -r src/ &> /dev/null && gen