From: Brandon Philips Date: Sun, 10 Jun 2012 01:38:50 +0000 (-0700) Subject: bootstrap: chdir to bootstrap's directory X-Git-Tag: release-120715~25^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9cd14a0ce0376e79a742fc59412136e5b460f558;p=platform%2Fupstream%2Fninja.git 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. --- 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',)