Updated common build script