buildt2h.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #! /bin/sh
  2. # Build texi2html.temp from $(texi2html_sources).
  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. if test -z "$9"; then
  15. echo "$0: expected nine arguments, see Makefile.am." >&2
  16. exit 1
  17. fi
  18. echo "generating $1 from $2 and $3 $4 $5 $6 $7 $8 $9"
  19. sed -e '4a\
  20. '"# $1: generated by `basename $0` from $2 and $3 $4 $5 $6 $7 $8 $9" \
  21. -e "/@MYSIMPLE@/r $3" \
  22. -e "/@T2H_I18N@/r $4" \
  23. -e "/@INIT@/r $5" \
  24. -e "/@T2H_TRANSLATIONS_FILE@/r $6" \
  25. -e "/@T2H_L2H_INIT@/r $7" \
  26. -e "/@T2H_L2H@/r $8" \
  27. -e "/@T2H_DOCUMENT_LANGUAGES@/r $9" \
  28. $2 >$1
  29. if test $? -ne 0; then
  30. echo "$0: failed to generate $1, moving to -bad, goodbye." >&2
  31. mv $1 $1-bad
  32. exit 1
  33. fi