( 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[] = {" scripts/iso639tab.py scripts/iso_639.xml | grep -v '^#' | grep -v '^$' | while read iso1 iso2 iso3 name do echo ' { "'$iso2'", "'$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