Update generate label script as per the legacy script changes.