From 8faaba28227bb29be5c09d52311eb8b69b2f2798 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 27 Dec 2018 12:43:18 -0500 Subject: tools/shman.sh: Add "-b base_dir" option --- (limited to 'tools') diff --git a/tools/shman.sh b/tools/shman.sh index 0c6dad3..3242329 100755 --- a/tools/shman.sh +++ b/tools/shman.sh @@ -306,11 +306,12 @@ main() local source='Shell' local manual='Shell Functions' local shso='' + local base_dir='.' local out_dir='.' local tags='' local f= - while getopts 'hVs:m:S:d:t:' opt; do + while getopts 'hVs:m:S:b:d:t:' opt; do case "${opt}" in 'h') help @@ -329,6 +330,9 @@ main() 'S') shso="${OPTARG}" ;; + 'b') + base_dir="${OPTARG}" + ;; 'd') out_dir="${OPTARG}" ;; @@ -350,7 +354,8 @@ main() fi mkdir -p "${out_dir}" for f in "${@}"; do - parse_docs "${f}" "${source}" "${manual}" "${shso}" "${out_dir}" + parse_docs "${base_dir}/${f}" \ + "${source}" "${manual}" "${shso}" "${out_dir}" done if [ -n "${tags}" ]; then exec 3>&- -- cgit v0.9.1