-
Notifications
You must be signed in to change notification settings - Fork 0
/
acc
executable file
·33 lines (28 loc) · 921 Bytes
/
acc
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
import sys
import os
import platform
import getpass
PLATFORM = platform.system()
USER_NAME = getpass.getuser()
ARGS = ' '.join(sys.argv[1:])
if('--' not in ARGS):
if('-o ' in ARGS):
arg_ind = ARGS.find('-o ')
ARGS = ARGS[:arg_ind+3]+'\"'+ARGS[arg_ind+3:]
else:
ARGS = '\"'+ARGS
if(' -eo ' in ARGS):
arg_ind = ARGS.find(' -eo ')
ARGS = ARGS[:arg_ind]+"\""+ARGS[arg_ind:arg_ind+5]+"\""+ARGS[arg_ind+5:]
if(' EO ' in ARGS):
arg_ind = ARGS.find(' EO ')
ARGS = ARGS[:arg_ind]+"\""+ARGS[arg_ind:arg_ind+4]+"\""+ARGS[arg_ind+4:]
ARGS += "\""
if PLATFORM == 'Windows':
APP_PATH = f"C:\\Users\\{USER_NAME}\\.acc"
os.system(f"python {APP_PATH}\\main.py {ARGS}")
elif PLATFORM == "Linux":
APP_PATH = f'/home/{USER_NAME}/.acc'
os.system(f'{APP_PATH}/./main.py {ARGS}')
else:
print("Application isnt compatible with your system yet")