summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2018-12-27 01:58:12 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2018-12-27 01:58:12 (EST)
commita04f90fbb307d45da443e5d58b7c116782852581 (patch)
tree7521c58180b73b7eafdbbaa3b5f94066b53b49e9
parentb9968fb3aa2aa558fd8a3bd5f88fdc5dfdb25e6e (diff)
tools/shman.sh: Write tags file
-rw-r--r--tools/shman.sh15
1 files changed, 15 insertions, 0 deletions
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()