[build.sh] Fix return code