lemmy-docs/build.sh

25 lines
632 B
Bash
Raw Normal View History

2021-09-27 11:28:27 +00:00
#!/bin/bash
set -e
2021-10-13 11:07:13 +00:00
git submodule init
2021-10-13 11:14:06 +00:00
git submodule foreach git pull
2021-10-13 11:05:16 +00:00
git submodule update --recursive --remote
ls -la lemmy
2021-09-27 11:28:27 +00:00
# generate config docs
pushd lemmy
mkdir -p ../generated
2021-09-27 11:28:27 +00:00
cargo run -- --print-config-docs >> ../generated/config.hjson
# replace // comments with #
sed -i "s/\/\//#/" ../generated/config.hjson
# remove trailing commas
sed -i "s/,\$//" ../generated/config.hjson
# remove quotes around json keys
sed -i "s/\"//" ../generated/config.hjson
sed -i "s/\"//" ../generated/config.hjson
popd
cargo install mdbook --git https://github.com/Nutomic/mdBook.git --branch localization \
--rev 0982a82
mdbook build .