From 9cd14a0ce0376e79a742fc59412136e5b460f558 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Sat, 9 Jun 2012 18:38:50 -0700 Subject: [PATCH] bootstrap: chdir to bootstrap's directory When integrating ninja into luvit I naively tried calling: ./tools/ninja/bootstrap.py This broke because bootstrap expects you to be in the ninja directory when you call it. This patch makes it possible to run bootstrap.py like above and have it work. --- bootstrap.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bootstrap.py b/bootstrap.py index ad6f1eb..f178bda 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -21,6 +21,8 @@ import errno import shlex import subprocess +os.chdir(os.path.dirname(sys.argv[0])) + parser = OptionParser() parser.add_option('--verbose', action='store_true', help='enable verbose build',) -- 2.7.4