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..5658f55e92c103ad8c60b939d0546a981586cf33 |
--- /dev/null |
+++ b/chrome/common/extensions/docs/server2/start_dev_server.py |
@@ -0,0 +1,33 @@ |
+#!/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 = 'chrome/common/extensions/docs/server2/' |
+FILENAMES = ['app.yaml', 'echo_handler.py'] |
+ |
+def CleanUp(signal, frame): |
+ for filename in FILENAMES: |
+ os.remove(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) |
Aaron Boodman
2012/06/02 07:50:22
:)
|
+ |
+build_server.main() |
+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.
|
+for filename in FILENAMES: |
+ shutil.copy(SERVER_PATH + filename, filename) |
+args = sys.argv[1:] |
+args.append('.') |
+subprocess.call(args) |