Update boot(strap).py

andrejusk/bday
Marek Ventur 2018-08-30 19:17:08 +01:00
parent 6d303c554f
commit 63fb58dcdd
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -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()