OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 | |
6 import os | |
7 import signal | |
8 import shutil | |
9 import subprocess | |
10 import sys | |
11 | |
12 import build_server | |
13 | |
14 SERVER_PATH = 'chrome/common/extensions/docs/server2/' | |
15 FILENAMES = ['app.yaml', 'echo_handler.py'] | |
16 | |
17 def CleanUp(signal, frame): | |
18 for filename in FILENAMES: | |
19 os.remove(filename) | |
20 | |
21 if len(sys.argv) < 2: | |
22 print 'usage: start_dev_server.py <location of dev_appserver.py> [options]' | |
23 exit(0) | |
24 | |
25 signal.signal(signal.SIGINT, CleanUp) | |
Aaron Boodman
2012/06/02 07:50:22
:)
| |
26 | |
27 build_server.main() | |
28 os.chdir(sys.path[0] + '/../../../../../') | |
Aaron Boodman
2012/06/02 07:50:22
chdir is kinda like a global variable. Is it possi
cduvall
2012/06/02 19:12:05
Done.
| |
29 for filename in FILENAMES: | |
30 shutil.copy(SERVER_PATH + filename, filename) | |
31 args = sys.argv[1:] | |
32 args.append('.') | |
33 subprocess.call(args) | |
OLD | NEW |