-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsanguine-rose.py
43 lines (35 loc) · 1.25 KB
/
sanguine-rose.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
# dash in the .py file name is non-Pythonic only for module files, and not for end-user scripts
import os
import sys
import time
sys.path.append(os.path.split(os.path.abspath(__file__))[0])
from sanguine.common import *
from sanguine.install.install_checks import check_sanguine_prerequisites
if __name__ == '__main__':
check_sanguine_prerequisites()
argv = sys.argv
argc = len(argv)
# print(argv)
thisscriptcalledas = os.path.split(argv[0])[1]
configfilepath = os.path.abspath(argv[1])
argv = argv[1:]
argc -= 1
ok = False
started = time.perf_counter()
if argc >= 2:
match argv[1].lower():
case 'mo2git':
ok = True
case 'git2mo':
if argc == 2:
ok = True
if ok:
elapsed = round(time.perf_counter() - started, 2)
print(thisscriptcalledas + ' took ' + str(elapsed) + ' sec')
else:
print('Usage:\n\t'
+ thisscriptcalledas + ' <project-config> mo2git\n\t'
+ thisscriptcalledas + ' <project-config> git2mo\n\t'
+ thisscriptcalledas + ' <project-config> debug.dumpwjdb <target-folder>\n\t'
+ thisscriptcalledas + ' <project-config> debug.modsizes\n'
)