120 parser = argparse.ArgumentParser()
121 parser.add_argument(
122 '--fail-loudly',
123 action='store_true',
124 default=False,
125 help="Return an error code if a prebuilt couldn't be fetched and extracted"
126 )
127
128 parser.add_argument(
129 '--verbose',
130 action='store_true',
131 default='LUCI_CONTEXT' in os.environ,
132 help='Emit verbose output'
133 )
134
135 parser.add_argument('--host-os', help='The host os')
136
137 parser.add_argument('--fuchsia-sdk-path', help='The path in gcs to the fuchsia sdk to download')
138
139 args = parser.parse_args()
140 fail_loudly = 1 if args.fail_loudly else 0
141 verbose = args.verbose
142 host_os = args.host_os
143 fuchsia_sdk_path = args.fuchsia_sdk_path
144
145 if fuchsia_sdk_path is None:
146 eprint(
'sdk_path can not be empty')
147 return fail_loudly
148
150 if archive is None:
151 eprint(
'Failed to download SDK from %s' % fuchsia_sdk_path)
152 return fail_loudly
153
155
156 success = True
157 return 0 if success else fail_loudly
158
159