bwbox/main.nim

17 lines
289 B
Nim
Raw Normal View History

2021-05-18 22:10:35 +02:00
import lib/sandbox
2021-06-19 16:33:47 +02:00
import lib/args
import options
2021-06-27 16:46:29 +02:00
import random
2021-05-16 20:35:01 +02:00
2021-06-19 16:33:47 +02:00
proc main(): int =
let args = parseArgs()
2021-05-16 20:35:01 +02:00
2021-06-19 16:33:47 +02:00
if args.isNone:
2021-08-14 13:15:07 +02:00
echo "Usage: bwshell --name=sandbox_name --profile=profile <sandbox_cmd>"
2021-06-19 16:33:47 +02:00
return 1
2021-05-18 22:10:35 +02:00
else:
2021-06-27 16:46:29 +02:00
randomize()
2021-06-20 14:09:30 +02:00
sandboxExec(args.unsafeGet)
2021-05-16 20:35:01 +02:00
2021-06-19 16:33:47 +02:00
quit(main())