diff options
author | Conley Owens <cco3@android.com> | 2012-03-27 10:21:06 -0700 |
---|---|---|
committer | Conley Owens <cco3@android.com> | 2012-03-27 10:21:06 -0700 |
commit | 3aec3f454ef6ba52543c31072e746c31561879e0 (patch) | |
tree | d687514eda9cc786dcd3806c23870125a11e5d38 /scripts | |
parent | e0cec46397b1387dfa23f864c06a8e503fff5b1b (diff) | |
download | source.android.com-3aec3f454ef6ba52543c31072e746c31561879e0.tar.gz |
Assume the location of the out directory
This change will allow us to run the mirco-httpd script from
any location. It will be especially nice to just:
* scripts/build.py
* scripts/micro-httpd.py
instead of having to continually change directories on subsequent
builds.
Change-Id: If251ba4c7002910ea1189569b1a230ad36c9269d
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/micro-httpd.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/micro-httpd.py b/scripts/micro-httpd.py index 9292dab0..1cffa089 100755 --- a/scripts/micro-httpd.py +++ b/scripts/micro-httpd.py @@ -18,10 +18,12 @@ import SimpleHTTPServer import SocketServer import os + +outdir = os.path.join(os.path.dirname(__file__), '..', 'out') +os.chdir(outdir) PORT = int(os.environ.get('HTTP_PORT', 8080)) Handler = SimpleHTTPServer.SimpleHTTPRequestHandler httpd = SocketServer.TCPServer(('0.0.0.0', PORT), Handler) httpd.allow_reuse_address = True print 'Serving on port %d' % PORT httpd.serve_forever() - |