tools/gen-manpage.sh
raw| 1 | #!/usr/bin/env bash |
| 2 | # Small script to run rst2man.py and error if there's any output |
| 3 | set -ex |
| 4 | |
| 5 | # rst2man.py doesn't return non-zero on warnings or errors 🤦 |
| 6 | # instead, if it outputs anything on stdout or stderr, assume it's some abnormal |
| 7 | # result and error |
| 8 | output="$(uv run --quiet rst2man.py "$1" "$2" 2>&1)" |
| 9 | |
| 10 | if [ -n "$output" ]; then |
| 11 | echo "$output" && false; |
| 12 | fi |