#!/bin/sh
rm -rf bin/Debug
rm -rf bin/Release
rm bin/docs.*

# Return an error if any of these fail
set -e
# Display the commands as they are executed
set -x
# Generating API docs
cp ../src/Brettle.Web.NeatUpload/install/bin/*.xml ../src/Extensions/*/install/bin/*.xml bin
ndoc bin/*.dll \
	-Documenter=MSDN \
	-SkipCompile=true \
	-OutputDirectory=api \
	-SdkLinksOnWeb=true \
	-OutputTarget=Web \
	-CleanIntermediates=false \
	-Title="NeatUpload Documentation"

# Converting Manual.flatxml to Manual.html via OpenOffice...
ooffice -invisible 'macro:///SaveAsHtml.Module1.SaveAsHTML("'`pwd`'/Manual.flatxml")'
