summaryrefslogtreecommitdiff
path: root/scripts/gentables
blob: cdc97db862756113107eb44d67c18716a7eb202d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

(
	echo "
//autogenerated by `pwd -P`/$0

genres_t genres[] = {"

cat scripts/genres.txt | while read gdid id3 name
do
	test "$id3" = N && id3=-1
	test "$gdid" = NULL && break
	echo '	{ "'$gdid'", '$id3', "'$name'" },'
done
echo '};
'

echo "lang_t languages[] = {"

cat scripts/languages.txt | while read iso name
do
	echo '	{ "'$iso'", "'$name'" },'
done
echo '};
'

echo "musictypes_t musictypes[] = {"

cat scripts/musictypes.txt | while read mtype
do
	echo '	{ "'$mtype'"},'
done
echo '};
'

echo "sources_t sources[] = {"

cat scripts/sources.txt | while read stype
do
	echo '	{ "'$stype'"},'
done
echo '};'
) >mg_tables.h