Optimized build script