lemmy-docs/build.sh
2021-10-13 13:14:06 +02:00

24 lines
632 B
Bash
Executable file

#!/bin/bash
set -e
git submodule init
git submodule foreach git pull
git submodule update --recursive --remote
ls -la lemmy
# generate config docs
pushd lemmy
mkdir -p ../generated
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 .