vfs: check userland buffers before reading them.
[haiku.git] / build / scripts / generate_CountryFlags.sh
blobaa2bde8d9fbb343188e2abf36672b547fa5e05aa
1 #!/bin/sh
3 # Generate LocaleKit's CountryFlags.rdef
4 # from all flag rdefs in the current folder
6 destination=CountryFlags.rdef
7 nr=0
9 for file in *
11 id=`echo "$file" | cut -b -2`
12 name=`echo "${file%%.*}" | cut -b 4-`
14 echo "// Flag data for $name" >> $destination
15 echo "resource($nr,\"$id\") #'VICN' array {" >> $destination
16 tail -n +3 "$file" >> $destination
17 echo >> $destination
19 nr=`expr $nr + 1`
20 echo \ $nr, $name, $id... OK
21 done