Index: chrome/common/extensions/docs/server2/start_dev_server.py |
diff --git a/chrome/common/extensions/docs/server2/start_dev_server.py b/chrome/common/extensions/docs/server2/start_dev_server.py |
new file mode 100755 |
index 0000000000000000000000000000000000000000..eaefdbb3d1db0de241ecbe00788d1ecab9466894 |
--- /dev/null |
+++ b/chrome/common/extensions/docs/server2/start_dev_server.py |
@@ -0,0 +1,34 @@ |
+#!/usr/bin/env python |
+# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+import os |
+import signal |
+import shutil |
+import subprocess |
+import sys |
+ |
+import build_server |
+ |
+SERVER_PATH = sys.path[0] |
+SRC_PATH = os.path.join(SERVER_PATH, '..', '..', '..', '..', '..') |
not at google - send to devlin
2012/06/04 04:37:08
pardir?
cduvall
2012/06/04 21:53:25
Done.
|
+FILENAMES = ['app.yaml', 'echo_handler.py'] |
+ |
+def CleanUp(signal, frame): |
+ for filename in FILENAMES: |
+ os.remove(os.path.join(SRC_PATH, filename)) |
+ |
+if len(sys.argv) < 2: |
+ print 'usage: start_dev_server.py <location of dev_appserver.py> [options]' |
+ exit(0) |
+ |
+signal.signal(signal.SIGINT, CleanUp) |
+ |
+build_server.main() |
not at google - send to devlin
2012/06/04 04:37:08
This means that starting the dev server involves c
Aaron Boodman
2012/06/04 06:29:09
There are going to be non-Python dependencies, lik
|
+for filename in FILENAMES: |
+ shutil.copy(os.path.join(SERVER_PATH, filename), |
+ os.path.join(SRC_PATH, filename)) |
+args = sys.argv[1:] |
+args.append(SRC_PATH) |
+subprocess.call(args) |