File: get-iso-codes

package info (click to toggle)
choose-mirror 2.135
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,636 kB
  • sloc: ansic: 792; perl: 201; sh: 162; makefile: 136
file content (21 lines) | stat: -rwxr-xr-x 581 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

set -e

# Get ISO codes from the iso-codes package and extract translations

[ -r debian/iso_3166.tab ] || exit 1

rm -rf debian/iso-codes
mkdir debian/iso-codes

for i in $(find /usr/share/locale/ -name iso_3166.mo) ; do
	language=$(echo $i | cut -f5 -d/)
	# Extract translations from the iso-codes package
	msgunfmt $i >debian/iso-codes/${language}.po 2>/dev/null
done

# If no iso-codes translation is available for se, then use nb instead
if [ ! -f debian/iso-codes/se.po ] && [ -f debian/iso-codes/nb.po ]; then
	cp debian/iso-codes/nb.po debian/iso-codes/se.po
fi