mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-09-09 16:08:49 -06:00
14 lines
283 B
Bash
14 lines
283 B
Bash
![]() |
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
|
dest=${1-config/defaults.hjson}
|
||
|
|
||
|
cargo run -- --print-config-docs > "$dest"
|
||
|
# replace // comments with #
|
||
|
sed -i "s/\/\//#/" "$dest"
|
||
|
# remove trailing commas
|
||
|
sed -i "s/,\$//" "$dest"
|
||
|
# remove quotes around json keys
|
||
|
sed -i "s/\"//" "$dest"
|
||
|
sed -i "s/\"//" "$dest"
|