mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-22 11:17:19 +00:00
364a805b9f
* set WARNS * few style/whitespace fixes Submitted by: ru
38 lines
586 B
Bash
38 lines
586 B
Bash
#!/bin/sh
|
|
#
|
|
# Validate all locales installed in specified directory
|
|
# (by default check system locales)
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
LOCALEDIR=/usr/share/locale
|
|
|
|
if [ "$1" != "" ]; then
|
|
LOCALEDIR=$1
|
|
fi
|
|
|
|
if [ ! -x ./localeck ]; then
|
|
echo "ERROR: build test program first."
|
|
exit 1
|
|
fi
|
|
|
|
PATH_LOCALE=$LOCALEDIR
|
|
LOCALES=0
|
|
ERRORS=0
|
|
|
|
echo "Validating locales in $LOCALEDIR"
|
|
echo
|
|
|
|
for i in `ls -1 $LOCALEDIR`
|
|
do
|
|
LOCALES=$(($LOCALES + 1))
|
|
./localeck $i || ERRORS=$(($ERRORS + 1))
|
|
done
|
|
|
|
echo
|
|
echo "Validation test complete"
|
|
echo "$LOCALES locales were checked"
|
|
echo "$ERRORS invalid locales were found"
|
|
|