Build.sh optimization