From a04f90fbb307d45da443e5d58b7c116782852581 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 27 Dec 2018 01:58:12 -0500 Subject: tools/shman.sh: Write tags file --- (limited to 'tools') diff --git a/tools/shman.sh b/tools/shman.sh index 5e27d95..5b1a254 100644 --- a/tools/shman.sh +++ b/tools/shman.sh @@ -211,6 +211,10 @@ parse_docs() date="$(get_mtime "${file}")" + if [ -n "${tags}" ]; then + exec 3>"${tags}" + fi + while IFS='' read -r line; do case "${line}" in '##'*) @@ -233,12 +237,23 @@ parse_docs() if ${got_doc}; then gen_doc "${date}" "${source}" "${manual}" \ "${line}" ${is_func} "${doc}" "${out_dir}" + if [ -n "${tags}" ]; then + if ${is_func}; then + printf '%s()\n' "${line}" >&3 + else + printf '%s\n' "${line}" >&3 + fi + fi doc='' got_doc=false elif ${is_func}; then warn 'Undocumented function "%s"' "${line}" fi done <"${file}" + + if [ -n "${tags}" ]; then + exec 3>&- + fi } usage() -- cgit v0.9.1