summaryrefslogtreecommitdiff
path: root/test/chk_loc.sh
blob: a210d7da9c81c83637e90642a4cf2c47a5ade6f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

if [ ! "$1" ]; then
    echo "ERROR argument missing." >&2
    echo "Usage: chk_loc.sh <locale name>" >&2
    exit 1
fi

LOC=`echo $1 | sed 's/-//g'`

locale -a | sed 's/-//g' | grep -i "^${LOC}$" 2>&1 > /dev/null

if [ "$?" = "0" ]
then
  echo "yes"
else
  echo "no"
fi