-
Notifications
You must be signed in to change notification settings - Fork 1
/
make.py
executable file
·38 lines (28 loc) · 863 Bytes
/
make.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
#!/usr/bin/env python3
import sys
from TemplateMake import TemplateMake
if __name__ == "__main__":
run = TemplateMake()
if len(sys.argv) == 1:
run.build()
exit()
if len(sys.argv) == 2 and not run.is_runtime(sys.argv[1]):
run.build(sys.argv[1])
exit()
if len(sys.argv) == 2 and sys.argv[1] == "run":
print("Command: ", end="")
try:
stdin=input()
except:
exit()
while stdin != "exit":
run.runtime(stdin)
print("Next command: ", end="")
stdin=input()
exit()
for i in range(1, len(sys.argv)-1):
if not run.is_runtime(sys.argv[i]):
continue
run.runtime(sys.argv[i], sys.argv[i+1])
if run.is_runtime(sys.argv[len(sys.argv)-1]):
run.runtime(sys.argv[len(sys.argv)-1])