refine build-script api