| 1 | #!/bin/sh |
| 2 | set -eu |
| 3 | |
| 4 | if ! [ -x runtime/doc/doctags ]; then |
| 5 | printf 'Must build doctags first\n' >&2 |
| 6 | exit 1 |
| 7 | fi |
| 8 | |
| 9 | ORIG_DIR=$(pwd) |
| 10 | DOC_DIR=$(mktemp -d) |
| 11 | trap 'rm -r $DOC_DIR' EXIT |
| 12 | |
| 13 | cp "$@" "$DOC_DIR"/ |
| 14 | cd "$DOC_DIR" |
| 15 | "$ORIG_DIR"/runtime/doc/doctags *.txt | LANG=C LC_ALL=C sort |