Universality in the run-up of shock waves to the surface of a star