-
Notifications
You must be signed in to change notification settings - Fork 0
/
MacOnVBox.py
81 lines (72 loc) · 1.78 KB
/
MacOnVBox.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import os
import sys
banner = """
,xNMM.
.OMMMMo
OMMM0,
.;loddo:' loolloddol;.
cKMMMMMMMMMMNWMMMMMMMMMM0:
.KMMMMMMMMMMMMMMMMMMMMMMMWd.
XMMMMMMMMMMMMMMMMMMMMMMMX.
;MMMMMMMMMMMMMMMMMMMMMMMM: MAC ON VIRTUALBOX!
:MMMMMMMMMMMMMMMMMMMMMMMM:
MMMMMMMMMMMMMMMMMMMMMMMMX.
kMMMMMMMMMMMMMMMMMMMMMMMMWd.
.XMMMMMMMMMMMMMMMMMMMMMMMMMMk
.XMMMMMMMMMMMMMMMMMMMMMMMMK.
kMMMMMMMMMMMMMMMMMMMMMMd
;KMMMMMMMWXXWMMMMMMMk.
.cooc,. .,coo:.
"""
class MainMenu(object):
def __init__(self):
self.menu = f"""{'='*10} MAIN MENU {'='*10}
1. Install a new version of mac
2. Update tools
3. Install PIP Requirements
"""
print(self.menu)
while True:
opt = input("Installer> ")
try:
if int(opt) == 1:
self._opt_1()
break
elif int(opt) == 2:
print("[*] Updating tools...")
os.system("git pull")
elif int(opt) == 3:
print("[*] Installing PIP requirements")
self._opt_3()
else:
continue
except:
continue
def _opt_1(self):
try:
os.chdir("core")
except:
print("Directory not found!")
exit()
try:
sys.argv[1]
os.system("python3 install.py --use-python3-flag")
except:
os.system("python install.py")
def _opt_3(self):
try:
os.chdir("core")
except:
print("Directory not found!")
exit()
try:
sys.argv[1]
os.system("python3 fix-requirements.py --use-python3-flag")
except:
os.system("python fix-requirements.py")
finally:
os.chdir("..")
os.system("clear")
os.execl(sys.executable, sys.executable, *sys.argv)
print(banner)
MainMenu()