1#! /bin/sh 2# Build texi2html.pl from texi2html.temp and $(texi2html_formats). 3# 4# Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 5# 2009, 2010 Free Software Foundation, Inc. 6# 7# This file is free software; as a special exception the author gives 8# unlimited permission to copy and/or distribute it, with or without 9# modifications, as long as this notice is preserved. 10# 11# This program is distributed in the hope that it will be useful, but 12# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the 13# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 15if test -z "$7"; then 16 echo "$0: expected seven arguments, see Makefile.am." >&2 17 exit 1 18fi 19 20echo "generating $1 from $2 and $3 $4 $5 $6 $7" 21 22sed -e '4a\ 23'"# $1: generated by `basename $0` from $2 and $3 $4 $5 $6 $7" \ 24 -e "/@INIT_HTML@/r $3" \ 25 -e "/@INIT_INFO@/r $4" \ 26 -e "/@INIT_DOCBOOK@/r $5" \ 27 -e "/@INIT_XML@/r $6" \ 28 -e "/@INIT_PLAINTEXT@/r $7" \ 29 $2 >$1 30 31if test $? -ne 0; then 32 echo "$0: failed to generate $1, moving to -bad, goodbye." >&2 33 mv $1 $1-bad 34 exit 1 35fi 36