build_latex_docs() {
cd docs || exit
./build.sh ./*.tex
cd ..
}
build_rust_docs() {
if [ -e rust-docs ]; then
rm -r rust-docs
fi
if [ -e target/doc ]; then
rm -r target/doc
fi
cargo doc --all --no-deps --release --all-features --color always
cp -R ./target/doc ./rust-docs
}
echo ""
read -r -p ">> Do you want to (re)generate Latex docs? [Yn]" yn
case $yn in
[Nn]* ) ;;
* ) build_latex_docs;;
esac
echo ""
read -r -p ">> Do you want to (re)generate Rust docs? [Yn]" yn
case $yn in
[Nn]* ) ;;
* ) build_rust_docs;;
esac
exit 0