1#!/bin/sh 2# 3# Validate all locales installed in specified directory 4# (by default check system locales) 5# 6# $FreeBSD$ 7# 8 9LOCALEDIR=/usr/share/locale 10 11if [ "$1" != "" ]; then 12 LOCALEDIR=$1 13fi 14 15if [ ! -x ./localeck ]; then 16 echo "ERROR: build test program first." 17 exit 1 18fi 19 20PATH_LOCALE=$LOCALEDIR 21LOCALES=0 22ERRORS=0 23 24echo "Validating locales in $LOCALEDIR" 25echo 26 27for i in `ls -1 $LOCALEDIR` 28do 29 LOCALES=`expr $LOCALES + 1` 30 ./localeck $i 31 if [ $? != 0 ]; then 32 ERRORS=`expr $ERRORS + 1` 33 fi 34done 35 36echo 37echo "Validation test complete." 38echo "$LOCALES locale(s) were checked" 39echo "$ERRORS invalid locale(s) were found" 40 41