home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / lib / tasksel / tests / lang < prev    next >
Encoding:
Text File  |  2006-07-26  |  424 b   |  18 lines

  1. #!/bin/sh
  2. # Hide all language tasks, and select any that match the current LANG
  3. # setting for installation.
  4. if [ "$NEW_INSTALL" ]; then
  5.     set -e
  6.     shift 1
  7.     baselang=$(expr "$LANG" : '\(.*\)_')
  8.     for locale in $@; do
  9.         if ( [ -n "$LANG" ] && [ "$LANG" = "$locale" ] ) || \
  10.            ( [ -n "$baselang" ] && [ "$baselang" = "$locale" ] ); then
  11.            exit 0 # install without display
  12.         fi
  13.     done
  14.     exit 1 # do not display
  15. else
  16.     exit 1
  17. fi
  18.