From 100fa76e5f1675dd18b9d35e5c7e88699a57ba7d Mon Sep 17 00:00:00 2001 From: Graham Wilson Date: Mon, 29 Nov 2004 01:52:17 +0000 Subject: Move the html2txt script to dist-tools. svn path=/trunk/; revision=4012 --- Makefile.am | 10 +++++----- dist-tools/html2txt | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ html2txt.sh | 49 ------------------------------------------------- 3 files changed, 54 insertions(+), 54 deletions(-) create mode 100755 dist-tools/html2txt delete mode 100755 html2txt.sh diff --git a/Makefile.am b/Makefile.am index 814e7df3..18205397 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,7 +11,7 @@ BUILT_SOURCES= rcfile_y.h bin_PROGRAMS= fetchmail dist_bin_SCRIPTS= fetchmailconf -dist_noinst_SCRIPTS= html2txt.sh specgen.sh +dist_noinst_SCRIPTS= specgen.sh dist_man1_MANS= fetchmail.man # for gettext (used by fetchmail.c, NOT by GNU gettext) @@ -81,16 +81,16 @@ EXTRA_DIST= $(DISTDOCS) fetchmail.spec $(distdirs) ucs/README.svn \ trio/CHANGES trio/README FAQ: fetchmail-FAQ.html - AWK=$(AWK) $(SHELL) $(srcdir)/html2txt.sh $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; } + AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; } FEATURES: fetchmail-features.html - AWK=$(AWK) $(SHELL) $(srcdir)/html2txt.sh $(srcdir)/fetchmail-features.html >$@ || { rm -f $@ ; exit 1 ; } + AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-features.html >$@ || { rm -f $@ ; exit 1 ; } NOTES: design-notes.html - AWK=$(AWK) $(SHELL) $(srcdir)/html2txt.sh $(srcdir)/design-notes.html >$@ || { rm -f $@ ; exit 1 ; } + AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/design-notes.html >$@ || { rm -f $@ ; exit 1 ; } TODO: todo.html - AWK=$(AWK) $(SHELL) $(srcdir)/html2txt.sh $(srcdir)/todo.html >$@ || { rm -f $@ ; exit 1 ; } + AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/todo.html >$@ || { rm -f $@ ; exit 1 ; } # man2html no longer chokes and dies on this man page, # but manServer.pl does a much better job. diff --git a/dist-tools/html2txt b/dist-tools/html2txt new file mode 100755 index 00000000..d2ae59a1 --- /dev/null +++ b/dist-tools/html2txt @@ -0,0 +1,49 @@ +#! /bin/sh + +# html2txt.sh - A program to convert fetchmail's HTML documentation to text +# Copyright (C) 2004 Matthias Andree + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +# -------------------------------------------------------------------------- + +# Usage: html2txt.sh INPUT.html + +# -------------------------------------------------------------------------- + +# Abort on error +set -e + +# Parse arguments +if [ $# -ne 1 ] ; then + echo >&2 "Usage: `basename $0 || echo $0` input.html" + exit 1 +fi + +# Pull in variables +inp="$1" +tmp="html2txt.$$.html" + +# now preprocess +trap "rm -f \"$tmp\"" 0 1 2 3 15 +${AWK:=awk} '/"$tmp" + +# and go! +echo " (This file was generated from $inp)" +lynx -dump -nolist "$tmp" +rm -f "$tmp" +trap "" 0 1 2 3 15 diff --git a/html2txt.sh b/html2txt.sh deleted file mode 100755 index d2ae59a1..00000000 --- a/html2txt.sh +++ /dev/null @@ -1,49 +0,0 @@ -#! /bin/sh - -# html2txt.sh - A program to convert fetchmail's HTML documentation to text -# Copyright (C) 2004 Matthias Andree - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# -------------------------------------------------------------------------- - -# Usage: html2txt.sh INPUT.html - -# -------------------------------------------------------------------------- - -# Abort on error -set -e - -# Parse arguments -if [ $# -ne 1 ] ; then - echo >&2 "Usage: `basename $0 || echo $0` input.html" - exit 1 -fi - -# Pull in variables -inp="$1" -tmp="html2txt.$$.html" - -# now preprocess -trap "rm -f \"$tmp\"" 0 1 2 3 15 -${AWK:=awk} '/
"$tmp" - -# and go! -echo " (This file was generated from $inp)" -lynx -dump -nolist "$tmp" -rm -f "$tmp" -trap "" 0 1 2 3 15 -- cgit v1.2.3