Optimize build script.