manr: fix
[copyleftie-scripts.git] / manr
blob9264fb3534821d4ce1d9b649afa4644a25ce83df
1 #!/bin/execlineb -WS1
3 backtick -in progname { basename ${0} }
4 multisubstitute {
5         importas -u progname progname
6         importas -u tmp tmp
9 ifelse { test ${#} -eq 2 } {
10         manr ${2}
11 } ifelse { test ${#} -gt 1 } {
12         usgerr ${progname} [section] manpage
13 } #else
14         foreground { pipeline { redirfd -w 2 ${tmp}/manr no9 xmandoc ${@} } fmt -ji 5 }
15         if -t { grep -s "No entry" ${tmp}/manr }
16                 exit 1