3 server
=$
(find .
/dsrc
/sku
.0/sys.server
/compiled
/game
/datatables
-name '*.tab')
4 inc
=$
(find .
/dsrc
/sku
.0/sys.shared
/compiled
/game
/datatables
/include
-name '*.tab')
5 shared
=$
(find .
/dsrc
/sku
.0/sys.shared
/compiled
/game
/datatables
-name '*.tab')
7 filenames
=("${server[@]}" "${inc[@]}" "${shared[@]}")
12 total=$(ls ${filenames[@]} | wc -l)
15 ofilename=${filename/dsrc/data}
16 ofilename=${ofilename/.tab/.iff}
17 mkdir -p $(dirname $ofilename)
19 [ -e $ofilename ] && rm "$ofilename"
21 result=$(./exe/linux/bin/DataTableTool -i "$filename" -- -s SharedFile searchPath10=data/sku.0/sys.shared/compiled/game searchPath10=data/sku.0/sys.server/compiled/game 2>&1)
23 if [[ ! $result =~ .*SUCCESS.* ]]; then
24 printf "\r$filename\n"
29 for filename in ${filenames[@]}; do
30 current=$((current+1))
32 perc=$(bc -l <<< "scale=0; $current*100/$total")
33 printf "\rGenerating Datatables: [${spinstr:$i:1}] $perc%%"
34 while [ `jobs | wc -l` -ge 20 ]
38 compile $filename & done