ti-helpversion.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/sh
  2. # $Id$
  3. # This file is public domain.
  4. # check texindex --help and --version. We'll just ensure that stdout is
  5. # nonempty and exit status is zero, and not worry if the output is sensible.
  6. # if we ever have more tests, we should move this to a common file,
  7. # and ideally share with install-info/tests/defs.in, etc.
  8. ####
  9. set -x
  10. # Make sure we override the user shell.
  11. SHELL='/bin/sh'; export SHELL
  12. # unsetting an already-unset variable fails with BSD sh.
  13. CDPATH=; unset CDPATH
  14. # If srcdir is not set, then we are not running from `make check'; be verbose.
  15. if test -z "$srcdir"; then
  16. VERBOSE=x
  17. # compute $srcdir.
  18. srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
  19. test $srcdir = $0 && srcdir=.
  20. fi
  21. texindex=./texindex
  22. TEXINDEX_SCRIPT=$srcdir/texindex.awk; export TEXINDEX_SCRIPT
  23. ####
  24. # The actual test follows.
  25. out=`$texindex --version`
  26. if test $? -ne 0 || test -z "$out"; then
  27. echo "$0: $texindex --version failed." >&2
  28. exit 1
  29. fi
  30. out=`$texindex --help`
  31. if test $? -ne 0 || test -z "$out"; then
  32. echo "$0: $texindex --help failed." >&2
  33. exit 1
  34. fi
  35. exit 0