summaryrefslogtreecommitdiff
path: root/build-aux/lookup-locale
blob: 2909f6ab517eaccb952334125da6a2db949046c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

# Return the full locale using the $(srcdir)/locales map.

case $# in
    1) MAP=locales;;
    2) MAP="$2";;
    *) echo "Usage: lookup-locale ABBR [MAP]" >&2; exit 2
esac

while read abbr locale
do
    [ x"$abbr" = "x$1" ] && exec echo "$locale"
done < "$MAP"

# Punt.
echo "$1"