Browse Source

Fail gracefully with ancient /usr/bin/man version

man version 1.x does not support local file mode.  sfdoc is mostly for
development purposes, so instead of jumping through hoops to make it
work; we assume user can view the pages in other format or on a less
obsolete distro.
Alois Mahdal 6 years ago
parent
commit
ac5aab87c3
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/bin/sfdoc

+ 2
- 0
src/bin/sfdoc View File

@@ -141,6 +141,8 @@ main() {
141 141
         man)
142 142
             which pod2man &>/dev/null \
143 143
              || die "pod2man is missing cannot use man page mode"
144
+            man --version |& grep -F 'man 2.' \
145
+             || die "unknown \`man\` (only 2.x is supported): $(man --version 2>&1)"
144 146
             sfdoc__export manpage "${RealModuleName:-$module}" "$mpath" "$encoding" \
145 147
               | man -l -
146 148
             ;;