Blame gettext-tools/projects/GNOME/trigger

Packit Bot 06c835
#!/bin/sh
Packit Bot 06c835
# Test whether the current package is a GNOME package.
Packit Bot 06c835
Packit Bot 06c835
# NLS nuisances: Letter ranges are different in the Estonian locale.
Packit Bot 06c835
LC_ALL=C
Packit Bot 06c835
Packit Bot 06c835
while true; do
Packit Bot 06c835
  configfiles=
Packit Bot 06c835
  if test -f configure.in; then
Packit Bot 06c835
    configfiles="$configfiles configure.in"
Packit Bot 06c835
  fi
Packit Bot 06c835
  if test -f configure.ac; then
Packit Bot 06c835
    configfiles="$configfiles configure.ac"
Packit Bot 06c835
  fi
Packit Bot 06c835
  if test -n "$configfiles"; then
Packit Bot 06c835
    if grep '^GNOME_' $configfiles >/dev/null 2>&1 ; then
Packit Bot 06c835
      exit 0
Packit Bot 06c835
    fi
Packit Bot 06c835
    exit 1
Packit Bot 06c835
  fi
Packit Bot 06c835
  dir=`basename \`pwd\``
Packit Bot 06c835
  case "$dir" in
Packit Bot 06c835
    i18n)
Packit Bot 06c835
      # This directory name, used in GNU make, is not the top level directory.
Packit Bot 06c835
      ;;
Packit Bot 06c835
    *[A-Za-z]*[0-9]*)
Packit Bot 06c835
      # Reached the top level directory.
Packit Bot 06c835
      exit 1
Packit Bot 06c835
  esac
Packit Bot 06c835
  # Go to parent directory
Packit Bot 06c835
  last=`/bin/pwd`
Packit Bot 06c835
  cd ..
Packit Bot 06c835
  curr=`/bin/pwd`
Packit Bot 06c835
  if test "$last" = "$curr"; then
Packit Bot 06c835
    # Oops, didn't find the top level directory.
Packit Bot 06c835
    exit 1
Packit Bot 06c835
  fi
Packit Bot 06c835
done