Rewrite update script.