diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2018-12-27 12:43:18 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2018-12-27 12:43:18 (EST) |
commit | 8faaba28227bb29be5c09d52311eb8b69b2f2798 (patch) | |
tree | 623e44e04f1221d3159bbb495c518ccbcd05a6ba | |
parent | 97cd945bc86f9a7362c2ebf293a1f95ab7fe0819 (diff) |
tools/shman.sh: Add "-b base_dir" option
-rwxr-xr-x | tools/shman.sh | 9 |
1 files changed, 7 insertions, 2 deletions
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>&- |