diff --git a/.gitignore b/.gitignore index 9e11225..2410f8a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.godoc +godoc .*.swp diff --git a/gendoc.sh b/gendoc.sh index 7cba3c1..1a5ede7 100755 --- a/gendoc.sh +++ b/gendoc.sh @@ -1,5 +1,7 @@ #!/bin/bash +DOC_DIR=godoc + # Run a godoc server which we will scrape. Clobber the GOPATH to include # only our dependencies. GOPATH=$(pwd):$(pwd)/vendor godoc -http=localhost:6060 & @@ -15,6 +17,9 @@ wget -r -m -k -E -p --include-directories="/pkg,/lib" --exclude-directories="*" # Stop the godoc server kill -9 $DOC_PID -mv localhost\:6060 .godoc -echo "Docs can be found in .godoc" +# Delete the old directory or else mv will put the localhost dir into .godoc +rm -rf $DOC_DIR +mv localhost\:6060 $DOC_DIR + +echo "Docs can be found in $DOC_DIR" echo "Replace /lib and /pkg in the gh-pages branch to update gh-pages"