how to write build scripts