missing-texi2html 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #! /bin/sh
  2. # Common stub for a few missing GNU programs while installing.
  3. # Copyright 1996, 1997, 1999, 2000, 2005 Free Software Foundation, Inc.
  4. # Copyright (C) 2005 Derek Price <derek@ximbiot.com>,
  5. # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2, or (at your option)
  9. # any later version.
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program; if not, write to the Free Software
  16. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  17. # 02110-1301, USA.
  18. if test $# -eq 0; then
  19. echo 1>&2 "Try \`$0 --help' for more information"
  20. exit 1
  21. fi
  22. run=:
  23. case "$1" in
  24. --run)
  25. # Try to run requested program, and just exit if it succeeds.
  26. run=
  27. shift
  28. "$@" && exit 0
  29. ;;
  30. esac
  31. # If it does not exist, or fails to run (possibly an outdated version),
  32. # try to emulate it.
  33. case "$1" in
  34. -h|--h|--he|--hel|--help)
  35. echo "\
  36. $0 [OPTION]... PROGRAM [ARGUMENT]...
  37. Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
  38. error status if there is no known handling for PROGRAM.
  39. Options:
  40. -h, --help display this help and exit
  41. -v, --version output version information and exit
  42. --run try to run the given command, and emulate it if it fails
  43. Supported PROGRAM values:
  44. texi2html touch output file"
  45. ;;
  46. -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
  47. echo "missing 0.3 - GNU automake (modified in texi2html)"
  48. ;;
  49. -*)
  50. echo 1>&2 "$0: Unknown \`$1' option"
  51. echo 1>&2 "Try \`$0 --help' for more information"
  52. exit 1
  53. ;;
  54. */perl)
  55. case "$2" in
  56. */texi2html.pl)
  57. ;;
  58. *)
  59. echo 1>&2 "\
  60. WARNING: \`$1 $2' is needed, and you do not seem to have it handy on your
  61. system. You might have modified some files without having the
  62. proper tools for further handling them. Check the \`README' file,
  63. it often tells you about the needed prerequirements for installing
  64. this package. You may also peek at any GNU archive site, in case
  65. some other package would contain this missing \`$1' program."
  66. exit 1
  67. ;;
  68. esac
  69. echo 1>&2 "\
  70. WARNING: \`$1 $2' is missing or broken on your system.
  71. You should only need it if you modified \`texi2html.info'.
  72. You might want to install the \`Perl' package. Grab it from
  73. any GNU archive site."
  74. if test -z "$3"; then
  75. echo 1>&2 "ERROR: No output file specified!"
  76. exit 1
  77. fi
  78. while test -n "$4"; do
  79. shift
  80. done
  81. file=`echo "$3" |sed 's/\.texi$/.html/'`
  82. file=`echo "$file" |sed 's/\.texinfo$/.html/'`
  83. touch "$file"
  84. ;;
  85. *)
  86. echo 1>&2 "\
  87. WARNING: \`$1' is needed, and you do not seem to have it handy on your
  88. system. You might have modified some files without having the
  89. proper tools for further handling them. Check the \`README' file,
  90. it often tells you about the needed prerequirements for installing
  91. this package. You may also peek at any GNU archive site, in case
  92. some other package would contain this missing \`$1' program."
  93. exit 1
  94. ;;
  95. esac
  96. exit 0