summaryrefslogtreecommitdiffstats
path: root/scripts/man2hlp.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:37:15 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 16:37:15 +0000
commitae5d181b854d3ccb373b6bc01b4869e44ff4d87a (patch)
tree91f59efb48c56a84cc798e012fccb667b63d3fee /scripts/man2hlp.sh
parentInitial commit. (diff)
downloadlynx-ae5d181b854d3ccb373b6bc01b4869e44ff4d87a.tar.xz
lynx-ae5d181b854d3ccb373b6bc01b4869e44ff4d87a.zip
Adding upstream version 2.9.0dev.12.upstream/2.9.0dev.12upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/man2hlp.sh')
-rwxr-xr-xscripts/man2hlp.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/man2hlp.sh b/scripts/man2hlp.sh
new file mode 100755
index 0000000..cc1653c
--- /dev/null
+++ b/scripts/man2hlp.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+# $LynxId: man2hlp.sh,v 1.4 2021/01/07 00:34:48 tom Exp $
+# This script uses rman (Rosetta Man), which complements TkMan, to strip
+# nroff headers from a manpage file, and format the result into a VMS help
+# file.
+
+LANG=C; export LANG
+LC_ALL=C; export LC_ALL
+LC_CTYPE=C; export LC_CTYPE
+LANGUAGE=C; export LANGUAGE
+
+for name in "$@"
+do
+ NAME=`echo "$name" |sed -e 's/\.man$/.1/'`
+ (echo 1 "`echo \"$NAME\" | sed -e 's/^.*\///' -e 's/\..*$//' | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`" ; \
+ (echo '.hy 0'; cat "$name") |\
+ nroff -Tascii -man |\
+ rman -n"$NAME" |\
+ sed -e 's/^[1-9].*$//' \
+ -e 's/^\([A-Z]\)/2 \1/' |\
+ uniq)
+done