3 DIR
="$( dirname "${BASH_SOURCE[0]}" )"
5 destination
="data/sku.0/sys.server/compiled/game"
6 sourcepath
="dsrc/sku.0/sys.server/compiled/game"
8 mkdir
-p $destination/script
10 filenames
=$
(find $sourcepath -name '*.java')
14 total=$(ls ${filenames[@]} | wc -l)
16 for filename in $filenames; do
17 OFILENAME=${filename/$sourcepath/$destination}
18 OFILENAME=${OFILENAME/java/class}
20 if [[ -e $OFILENAME && $filename -nt $OFILENAME ]] || [ ! -e $OFILENAME ]; then
21 result=$(${DIR}/build_java_single.sh $filename 2>&1)
24 if [[ ! -z $result ]]; then
25 printf "\r$filename\n"
29 current=$((current+1))
31 perc=$(bc -l <<< "scale=0; $current*100/$total")
32 printf "\rCompiling java scripts: [${spinstr:$i:1}] $perc%%"