home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / gettext / projects / GNOME / trigger < prev   
Encoding:
Text File  |  2006-08-18  |  863 b   |  39 lines

  1. #!/bin/sh
  2. # Test whether the current package is a GNOME package.
  3.  
  4. # NLS nuisances: Letter ranges are different in the Estonian locale.
  5. LC_ALL=C
  6.  
  7. while true; do
  8.   configfiles=
  9.   if test -f configure.in; then
  10.     configfiles="$configfiles configure.in"
  11.   fi
  12.   if test -f configure.ac; then
  13.     configfiles="$configfiles configure.ac"
  14.   fi
  15.   if test -n "$configfiles"; then
  16.     if grep '^GNOME_' $configfiles >/dev/null 2>&1 ; then
  17.       exit 0
  18.     fi
  19.     exit 1
  20.   fi
  21.   dir=`basename \`pwd\``
  22.   case "$dir" in
  23.     i18n)
  24.       # This directory name, used in GNU make, is not the top level directory.
  25.       ;;
  26.     *[A-Za-z]*[0-9]*)
  27.       # Reached the top level directory.
  28.       exit 1
  29.   esac
  30.   # Go to parent directory
  31.   last=`/bin/pwd`
  32.   cd ..
  33.   curr=`/bin/pwd`
  34.   if test "$last" = "$curr"; then
  35.     # Oops, didn't find the top level directory.
  36.     exit 1
  37.   fi
  38. done
  39.