Try to simplify build.sh and see if that fixes things.