Procházet zdrojové kódy

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 před 7 roky
rodič
revize
ac5aab87c3
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2
    0
      src/bin/sfdoc

+ 2
- 0
src/bin/sfdoc Zobrazit soubor

@@ -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
             ;;