Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions flashall.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,23 @@ class color:
print(color.RED + "\npreparing to flash rom, 5 seconds to abort..." + color.END)
time.sleep(5)

print(color.PURPLE+"Checking if partitions are there..."+color.END)
time.sleep(1)

missing = False
for partition in partitions:
if not os.path.exists(f"./{partition}.img"):
missing = True
print(color.RED+f"Missing partition {partition}"+ color.END)
if missing:
print(color.RED+f"due to the missing partitions you have 5 seconds to abort..."+ color.END)
time.sleep(5)
del missing

print(color.RED + "starting to flash rom...\n" + color.END)
time.sleep(1)


for partition in partitions:
if not os.path.exists(f"./{partition}.img"):
print(color.BOLD + color.PURPLE + f"no {partition} to flash" + color.END)
Expand Down