Made build-docs.sh more general