From: Kevin Sonney (ksonney@redhat.com)
Date: 05/09/03
Subject: [patch] Using elinks to generate docs From: Kevin Sonney <ksonney@redhat.com> Date: 09 May 2003 09:23:58 -0400
lynx is no longer included in Red Hat Linux distributions. It has been
superseded by links. The attached patch will test for links, and use
that for documentation generation. If links i not found, lynx will be
used instead.
This is also used in the SRPM available at ftp://people.redhat.com/ksonney/SRPMS
--
# .html -> .txt with lynx
echo "Documentation: html -> txt..."
-lynx -dump -nolist docs/faq.html|perl -pe 's/^ *//; if ($_ eq "\n" && $state eq "Q") { $_ = ""; } elsif (/^([QA]):/) { $state = $1 } elsif ($_ ne "\n") { $_ = " $_"; };' > docs/faq.txt
+textbrowser="links"
+if test ! -f $(which $textbrowser); then
+ textbrowser="lynx"
+fi
+
+$textbrowser -dump -nolist docs/faq.html|perl -pe 's/^ *//; if ($_ eq "\n" && $state eq "Q") { $_ = ""; } elsif (/^([QA]):/) { $state = $1 } elsif ($_ ne "\n") { $_ = " $_"; };' > docs/faq.txt
echo "Checking auto* tools..."