update upgrade script to use the new "script" mode