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
diff --git a/scripts/micro-httpd.py b/scripts/micro-httpd.py
index 9292dab..1cffa08 100755
--- a/scripts/micro-httpd.py
+++ b/scripts/micro-httpd.py
@@ -18,10 +18,12 @@
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()
-