From e72e08ea9c7ed2f19ec7539984a3740db056fdba Mon Sep 17 00:00:00 2001 From: Manish Goregaokar Date: Mon, 3 Sep 2018 15:05:21 +0530 Subject: Allow bootstrap to be run before anything else is installed --- python/mach_bootstrap.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'python/mach_bootstrap.py') diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py index 2db4bf01c30..3435b39f06a 100644 --- a/python/mach_bootstrap.py +++ b/python/mach_bootstrap.py @@ -224,11 +224,29 @@ def _is_windows(): return sys.platform == 'win32' +class DummyContext(object): + pass + + +def bootstrap_command_only(topdir): + from servo.bootstrap import bootstrap + + context = DummyContext() + context.topdir = topdir + force = False + if len(sys.argv) == 3 and sys.argv[2] == "-f": + force = True + bootstrap(context, force) + return 0 + + def bootstrap(topdir): _ensure_case_insensitive_if_windows() topdir = os.path.abspath(topdir) + len(sys.argv) > 1 and sys.argv[1] == "bootstrap" + # We don't support paths with Unicode characters for now # https://github.com/servo/servo/issues/10002 try: -- cgit v1.2.3