From c6b3fc6fe57bab25726c782d06e7ff493726f274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=C3=A6r=C3=B8y?= Date: Sun, 31 Jan 2010 12:22:46 +0000 Subject: [PATCH] Use elinks if lynx is not present. From Ingmar Vanhassel of Exherbo fame. git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@5109 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- autogen.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index 4d98cf9e..96b9f0f9 100755 --- a/autogen.sh +++ b/autogen.sh @@ -34,9 +34,15 @@ cat docs/help/in/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr files=`echo $files|sed 's/\.in//g'` cat docs/help/Makefile.am.gen|sed "s/@HELPFILES@/$files/g"|sed 's/?/\\?/g'|tr '!?' '\t\n' > docs/help/Makefile.am -# .html -> .txt with lynx +# .html -> .txt with lynx or elinks 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 +if type lynx >/dev/null 2>&1 ; then + 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 +elif type elinks >/dev/null 2>&1 ; then + elinks -dump docs/faq.html|perl -pe 's/^ *//; if ($_ eq "\n" && $state eq "Q") { $_ = ""; } elsif (/^([QA]):/) { $state = $1 } elsif ($_ ne "\n") { $_ = " $_"; };' > docs/faq.txt +else + echo No lynx or links present +fi if test x$NOCONFIGURE = x && test -z "$*"; then echo "**Warning**: I am going to run \`configure' with no arguments."