summaryrefslogtreecommitdiffstats
path: root/contrib/groff/src/roff/nroff/nroff.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/groff/src/roff/nroff/nroff.sh')
-rwxr-xr-xcontrib/groff/src/roff/nroff/nroff.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/contrib/groff/src/roff/nroff/nroff.sh b/contrib/groff/src/roff/nroff/nroff.sh
index b1cab83..0e9eebd 100755
--- a/contrib/groff/src/roff/nroff/nroff.sh
+++ b/contrib/groff/src/roff/nroff/nroff.sh
@@ -66,6 +66,12 @@ for i
# Solaris 2.2 `man' uses -u0; ignore it,
# since `less' and `more' can use the emboldening info.
;;
+ -v | --version)
+ echo "GNU nroff (groff) version @VERSION@"
+ exit 0 ;;
+ --help)
+ echo "usage: nroff [-h] [-i] [-mNAME] [-nNUM] [-oLIST] [-rCN] [-Tname] [FILE...]"
+ exit 0 ;;
--)
shift
break ;;
@@ -82,4 +88,11 @@ done
# This shell script is intended for use with man, so warnings are
# probably not wanted. Also load nroff-style character definitions.
-exec groff $safer -Wall -mtty-char $T $opts ${1+"$@"}
+
+OLD_PATH=$PATH
+: ${GROFF_BIN_PATH=@BINDIR@}
+export GROFF_BIN_PATH
+PATH=$GROFF_BIN_PATH
+PATH=$OLD_PATH groff $safer -Wall -mtty-char $T $opts ${1+"$@"}
+
+# eof
OpenPOWER on IntegriCloud