diff options
author | Brendan O'Dea <bod@debian.org> | 2015-06-08 20:09:54 +1000 |
---|---|---|
committer | Brendan O'Dea <bod@debian.org> | 2015-06-08 20:09:54 +1000 |
commit | 4146add2bc50ce7be708a94c763015046c60726a (patch) | |
tree | 507f91e83b39dc34d8bebf785ca240f7eb2b9600 /build-aux | |
parent | 53f294e0f6bd8ccb94189eeb5b4f3de26c0908bd (diff) | |
download | help2man-4146add2bc50ce7be708a94c763015046c60726a.tar.gz |
Set document language for localised info pages
Diffstat (limited to 'build-aux')
-rwxr-xr-x | build-aux/lookup-locale | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/build-aux/lookup-locale b/build-aux/lookup-locale new file mode 100755 index 0000000..2909f6a --- /dev/null +++ b/build-aux/lookup-locale @@ -0,0 +1,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" + |