haiku/build/scripts/generate_CountryFlags.sh
Joachim Seemer f79510c141 Changed comment prefix from # to //. Thanks yourpalal.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-04 18:27:00 +00:00

22 lines
446 B
Bash
Executable File

#!/bin/sh
# Generate LocaleKit's CountryFlags.rdef
# from all flag rdefs in the current folder
destination=CountryFlags.rdef
nr=0
for file in *
do
id=`echo "$file" | cut -b -2`
name=`echo "${file%%.*}" | cut -b 4-`
echo "// Flag data for $name" >> $destination
echo "resource($nr,\"$id\") #'VICN' array {" >> $destination
tail -n +3 "$file" >> $destination
echo >> $destination
nr=`expr $nr + 1`
echo \ $nr, $name, $id... OK
done