Update update script to work with branches