aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/config/util/mkhtmlindex.sh
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-10-10 17:43:39 +0200
committerReinhard Tartler <siretart@tauware.de>2011-10-10 17:43:39 +0200
commitf4092abdf94af6a99aff944d6264bc1284e8bdd4 (patch)
tree2ac1c9cc16ceb93edb2c4382c088dac5aeafdf0f /nx-X11/config/util/mkhtmlindex.sh
parenta840692edc9c6d19cd7c057f68e39c7d95eb767d (diff)
downloadnx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.tar.gz
nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.tar.bz2
nx-libs-f4092abdf94af6a99aff944d6264bc1284e8bdd4.zip
Imported nx-X11-3.1.0-1.tar.gznx-X11/3.1.0-1
Summary: Imported nx-X11-3.1.0-1.tar.gz Keywords: Imported nx-X11-3.1.0-1.tar.gz into Git repository
Diffstat (limited to 'nx-X11/config/util/mkhtmlindex.sh')
-rw-r--r--nx-X11/config/util/mkhtmlindex.sh60
1 files changed, 60 insertions, 0 deletions
diff --git a/nx-X11/config/util/mkhtmlindex.sh b/nx-X11/config/util/mkhtmlindex.sh
new file mode 100644
index 000000000..ab1c894ea
--- /dev/null
+++ b/nx-X11/config/util/mkhtmlindex.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+#
+# $XFree86: xc/config/util/mkhtmlindex.sh,v 1.3 2000/08/26 04:30:49 dawes Exp $
+#
+# Copyright © 2000 by Precision Insight, Inc.
+#
+# Generate index files for the HTML man pages
+#
+# Author: David Dawes <dawes@xfree86.org>
+#
+
+VOLLIST="1 2 3 4 5 6 7 8 9 o l n p"
+INDEX="manindex"
+
+if [ $# != 1 ]; then
+ echo Usage: $0 htmlmandir
+ exit 1
+fi
+
+if [ ! -d $1 ]; then
+ echo $1 is not a directory
+ exit 1
+fi
+
+cd $1
+
+for s in $VOLLIST; do
+ list="`ls *.$s.html 2> /dev/null`" || : # ignore failed glob expansion
+ if [ X"$list" != X ]; then
+ file=$INDEX$s.html
+ rm -f $file
+ cat <<EOF > $file
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<TITLE>X.Org Manual pages: Section $s</TITLE>
+</HEAD>
+<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
+
+<H1>X.Org Manual pages: Section $s</H1>
+<P>
+<UL>
+EOF
+ for i in $list; do
+ title="`sed -e '/^[^0-9A-Za-z]/d' -e '/^$/' -e '/^Name/d' -e q $i`"
+ name="`echo \"$title\" | sed -e 's/ - .*//'`"
+ desc="`echo \"$title\" | sed -e 's/[^-]* - //' -e 's/<P>//'`"
+ echo "<LI><A href=\"$i\">$name</A> - $desc</LI>" >> $file
+ done
+ cat <<EOF >> $file
+</UL>
+<P>
+</BODY>
+</HTML>
+EOF
+ fi
+done
+
+exit 0