OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """A CherryPy-based webserver to host images and build packages.""" | 7 """A CherryPy-based webserver to host images and build packages.""" |
8 | 8 |
9 import cherrypy | 9 import cherrypy |
10 import optparse | 10 import optparse |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 urlbase=options.urlbase, | 186 urlbase=options.urlbase, |
187 test_image=options.test_image, | 187 test_image=options.test_image, |
188 factory_config_path=options.factory_config, | 188 factory_config_path=options.factory_config, |
189 client_prefix=options.client_prefix, | 189 client_prefix=options.client_prefix, |
190 forced_image=options.image, | 190 forced_image=options.image, |
191 forced_payload=options.payload, | 191 forced_payload=options.payload, |
192 port=options.port, | 192 port=options.port, |
193 proxy_port=options.proxy_port, | 193 proxy_port=options.proxy_port, |
194 src_image=options.src_image, | 194 src_image=options.src_image, |
195 vm=options.vm, | 195 vm=options.vm, |
196 board=options.board) | 196 board=options.board, |
| 197 copy_to_static_root=not options.exit) |
197 | 198 |
198 # Sanity-check for use of validate_factory_config. | 199 # Sanity-check for use of validate_factory_config. |
199 if not options.factory_config and options.validate_factory_config: | 200 if not options.factory_config and options.validate_factory_config: |
200 parser.error('You need a factory_config to validate.') | 201 parser.error('You need a factory_config to validate.') |
201 | 202 |
202 if options.factory_config: | 203 if options.factory_config: |
203 updater.ImportFactoryConfigFile(options.factory_config, | 204 updater.ImportFactoryConfigFile(options.factory_config, |
204 options.validate_factory_config) | 205 options.validate_factory_config) |
205 # We don't run the dev server with this option. | 206 # We don't run the dev server with this option. |
206 if options.validate_factory_config: | 207 if options.validate_factory_config: |
207 sys.exit(0) | 208 sys.exit(0) |
208 elif options.pregenerate_update: | 209 elif options.pregenerate_update: |
209 if not updater.PreGenerateUpdate(): | 210 if not updater.PreGenerateUpdate(): |
210 sys.exit(1) | 211 sys.exit(1) |
211 | 212 |
212 # If the command line requested after setup, it's time to do it. | 213 # If the command line requested after setup, it's time to do it. |
213 if not options.exit: | 214 if not options.exit: |
214 cherrypy.quickstart(DevServerRoot(), config=_GetConfig(options)) | 215 cherrypy.quickstart(DevServerRoot(), config=_GetConfig(options)) |
OLD | NEW |