basic commandline support

This commit is contained in:
Fierelier 2019-07-22 04:01:43 +02:00
parent 372771b98e
commit 429c5dacb7
1 changed files with 14 additions and 0 deletions

View File

@ -75,6 +75,20 @@ def launchPrefix(prefix,cmd,raw = False):
def main():
args = sys.argv[1:]
if args != []:
prefixLocation = cv(config["DEFAULT"]["prefixLocation"])
if not os.path.isdir(p(prefixLocation,args[0])):
print("error: prefix does not exist")
return
cmd = ["cmd"]
if (len(args) > 1):
cmd = args[1:]
launchPrefix(args[0],cmd)
return
while True:
prefixLocation = cv(config["DEFAULT"]["prefixLocation"])
print("list of prefixes:")