From a8336cdeab5e0c26046a71cd60b1e5b62323553e Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Wed, 2 Nov 2016 16:52:11 +0000 Subject: [PATCH] Review comments --- gendoc.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gendoc.sh b/gendoc.sh index b61d5e8..d088e12 100755 --- a/gendoc.sh +++ b/gendoc.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -u DOC_DIR=godoc @@ -8,7 +9,14 @@ GOPATH=$(pwd):$(pwd)/vendor godoc -http=localhost:6060 & DOC_PID=$! # Wait for the server to init -sleep 1 +while : +do + curl -s "http://localhost:6060" > /dev/null + if [ $? -eq 0 ] # exit code is 0 if we connected + then + break + fi +done # Scrape the pkg directory for the API docs. Scrap lib for the CSS/JS. Ignore everything else. # The output is dumped to the directory "localhost:6060".