simplify swift script

Change-Id: Ib1b30243c6f9903db22606aed7febb5f56368c73