2021-11-19 21:13:37 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -euxo pipefail
|
|
|
|
|
|
|
|
rm -rf public/
|
2021-11-19 21:21:31 -05:00
|
|
|
|
|
|
|
if [ -x $(which mdbook) ] ; then
|
|
|
|
echo "mdBook found, running..."
|
|
|
|
else
|
|
|
|
echo "mdBook not found, downloading..."
|
|
|
|
wget https://github.com/rust-lang/mdBook/releases/download/v0.4.13/mdbook-v0.4.13-x86_64-unknown-linux-gnu.tar.gz -O mdbook.tgz
|
|
|
|
tar zxvf mdbook.tgz
|
|
|
|
mv mdbook /usr/local/bin/
|
|
|
|
fi
|
|
|
|
|
2021-11-19 21:13:37 -05:00
|
|
|
mdbook build -d public
|
|
|
|
|
|
|
|
# Make checkboxes editable, just in case the user wants to keep their own checklist.
|
|
|
|
find public/ -name "*.html" -type f -exec sed -i 's/input disabled=""/input/g' {} +
|
|
|
|
|
|
|
|
cp -R static/* public/
|