Bläddra i källkod

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 7 år sedan
förälder
incheckning
ac5aab87c3
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2
    0
      src/bin/sfdoc

+ 2
- 0
src/bin/sfdoc Visa fil

141
         man)
141
         man)
142
             which pod2man &>/dev/null \
142
             which pod2man &>/dev/null \
143
              || die "pod2man is missing cannot use man page mode"
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
             sfdoc__export manpage "${RealModuleName:-$module}" "$mpath" "$encoding" \
146
             sfdoc__export manpage "${RealModuleName:-$module}" "$mpath" "$encoding" \
145
               | man -l -
147
               | man -l -
146
             ;;
148
             ;;