2
# Poor man's placeholder for help2man invocation on systems lacking perl;
3
# it generates a dummy man page stating that a proper one could not be
4
# generated, and redirecting the user back to either the info
5
# documentation or the '--help' output.
11
printf '%s: %s\n' "$0" "$*" >&2
17
printf '%s\n' "$1" | sed 's,.*/,,'
21
source="GNU coreutils"
22
while test $# -gt 0; do
24
# Help2man options we recognize and handle.
25
--output=*) output=`expr x"$1" : x'--output=\(.*\)'`;;
26
--output) shift; output=$1;;
27
--source=*) source=`expr x"$1" : x'--source=\(.*\)'`;;
28
--source) shift; source=$1;;
29
# Recognize (as no-op) other help2man options that might be used
33
-*) fatal_ "invalid or unrecognized help2man option '$1'";;
40
test $# -gt 0 || fatal_ "missing argument"
41
test $# -le 1 || fatal_ "too many non-option arguments"
43
baseout=`basename_ "$output"`
44
sed 's/^/WARNING: /' >&2 <<END
45
Cannot create proper '$baseout' man page, since perl is missing or
46
inadequate on this system. Creating a stub man page instead.
49
progname=`basename_ "$1"`
50
year=`LC_ALL=C date +%Y`
54
.TH "$progname" 1 "$year" "$source" "User Commands"
56
$progname $bs- a $source program
59
Due to the lack of perl on the build system, we were
60
unable to create a proper manual page for
62
For concise option descriptions, run
64
.B env $progname --help
66
The full documentation for
68
is maintained as a Texinfo manual, which should be accessible
69
on your system via the command
71
.B info coreutils $bs(aq$progname invocation$bs(aq