-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbootopt.py
47 lines (43 loc) · 1.26 KB
/
bootopt.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import sys, os, subprocess, time
os.system("setterm -background blue -foreground white")
IS_WINDOWS = os.name == "nt"
IS_MAC = sys.platform == "darwin"
def clear_screen():
if IS_WINDOWS:
os.system("cls")
else:
os.system("clear")
def user_choice():
return input("\n>>> ").lower().strip()
def main():
clear_screen()
print("(A≈) Boot Options\n"
"=====================")
print("\n"
"1. Run ArtSystem\n"
"2. Run Safe Mode\n"
"3. Run Safe Mode (With Networking)\n"
"4. Run Restore Module\n"
"5. Run Upgrade Module\n"
"6. Run Linux Launcher\n"
"\n"
"0. Exit")
choice = user_choice()
if choice == "1":
subprocess.call((sys.executable, "run.py"))
if choice == "2":
subprocess.call((sys.executable, "safemode/safe.py"))
if choice == "3":
subprocess.call((sys.executable, "safemode/safen.py"))
if choice == "4":
subprocess.call((sys.executable, "sysrestore.py"))
if choice == "5":
subprocess.call((sys.executable, "upgrade.py"))
if choice == "6":
try:
subprocess.call(("./run.sh"))
except:
os.system("run.sh")
if choice == "0":
sys.exit()
main()