File: create-table.sh

package info (click to toggle)
efi-reader 0.11
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 40 kB
  • sloc: ansic: 64; makefile: 33; sh: 13
file content (24 lines) | stat: -rw-r--r-- 302 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

# Build iso-639-2 to iso-639-1 table for efi-reader
# 
#

cat > table.h << EOF

struct {
	char threecode[4];
	char twocode[3];
	} trans_table[] = {
EOF

isoquery -i 639 -c | cut -f1,3 | \
sed -r '/\t$/d; s/(.+)\t(.+)/{"\1"\,"\2"}\,/' \
>> table.h


cat >> table.h << EOF
 { "","" },
};

EOF