ripgrep-all/update-readme.sh
2020-06-06 15:01:53 +02:00

12 lines
388 B
Bash
Executable File

#!/bin/bash
content=$(
cat <<END
<!-- this part generated by update-readme.sh -->
$(help2man -N "cargo run --bin rga --" | pandoc -f man -t markdown --atx-headers | rg --multiline "## USAGE:(.|\n)*")
<!-- end of part generated by update-readme.sh -->
END
)
rg --passthrough --multiline '.*update-readme.sh(.|\n)*update-readme.sh.*' README.md --replace "$content" | sponge README.md