Imported Upstream version 1.48.3
[platform/upstream/help2man.git] / build-aux / lookup-locale
1 #!/bin/sh
2
3 # Return the full locale using the $(srcdir)/locales map.
4
5 case $# in
6     1) MAP=locales;;
7     2) MAP="$2";;
8     *) echo "Usage: lookup-locale ABBR [MAP]" >&2; exit 2
9 esac
10
11 while read abbr locale
12 do
13     [ x"$abbr" = "x$1" ] && exec echo "$locale"
14 done < "$MAP"
15
16 # Punt.
17 echo "$1"
18