2021-05-18 22:10:35 +02:00
|
|
|
import lib/sandbox
|
2021-06-16 19:48:13 +02:00
|
|
|
import lib/modes
|
2021-06-19 16:33:47 +02:00
|
|
|
import lib/args
|
2021-05-16 20:35:01 +02:00
|
|
|
import strformat
|
2021-06-16 19:48:13 +02:00
|
|
|
import strutils
|
2021-06-19 16:33:47 +02:00
|
|
|
import options
|
2021-05-16 20:35:01 +02:00
|
|
|
import os
|
|
|
|
|
2021-06-19 16:33:47 +02:00
|
|
|
proc main(): int =
|
|
|
|
let mode = parseEnum[Modes](paramStr(0), Modes.Shell)
|
|
|
|
let args = parseArgs()
|
2021-05-16 20:35:01 +02:00
|
|
|
|
2021-06-19 16:33:47 +02:00
|
|
|
if args.isNone:
|
|
|
|
echo &"Usage: {mode} --command=cmd --profile=profile <sandbox_name>"
|
|
|
|
return 1
|
2021-05-18 22:10:35 +02:00
|
|
|
else:
|
2021-06-19 16:33:47 +02:00
|
|
|
sandboxExec(mode, args.unsafeGet)
|
2021-05-16 20:35:01 +02:00
|
|
|
|
2021-06-19 16:33:47 +02:00
|
|
|
quit(main())
|