File: get-iso-codes

package info (click to toggle)
localechooser 1.37
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 708 kB
  • ctags: 24
  • sloc: sh: 740; perl: 201; makefile: 82; awk: 42; python: 38
file content (19 lines) | stat: -rwxr-xr-x 543 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
#
# Get ISO codes from the iso-codes package and extract translations
set -e

rm -rf debian/iso-codes >/dev/null 2>&1
mkdir debian/iso-codes

for i in `find /usr/share/locale/ -name iso_3166.mo` ; do
  language=`echo $i | cut -f5 -d/`
  # If a file exists in iso-codes.updates, then use it
  # else extract translations from the iso-codes package
  if [ ! -f iso-codes.updates/$language.po ] ; then
    msgunfmt $i >debian/iso-codes/${language}.po 2>/dev/null
  else
    cp iso-codes.updates/$language.po debian/iso-codes
  fi
done