diff --git a/boot.py b/boot.py index 70b8568..ede015b 100644 --- a/boot.py +++ b/boot.py @@ -25,11 +25,14 @@ def any_home(): if "no_boot" in root: print("no_boot found, aborting boot sequence") +elif "bootstrap.py" in root: + print("Bootstrapping...") + tilda.main("bootstrap.py") else: start = None if "main.py" in root: start = "main.py" - start = start or file("once.txt", True) or file("default_app.txt", False) or any_home() or "bootstrap.py" + start = start or file("once.txt", True) or file("default_app.txt", False) or any_home() if ".py" not in start: start += "/main.py" print("Booting into %s" % start) diff --git a/bootstrap.py b/bootstrap.py index c3fb4e3..0378d91 100644 --- a/bootstrap.py +++ b/bootstrap.py @@ -184,6 +184,7 @@ def step_download(): def step_goodbye(): msg("All done!\n\nRestarting badge...") + os.remove("bootstrap.py") time.sleep(2) machine.reset()