2022-01-09 09:29:11 +01:00
|
|
|
module main
|
|
|
|
|
|
|
|
import os
|
2022-02-21 20:51:41 +01:00
|
|
|
import server
|
|
|
|
import util
|
2022-01-09 10:36:02 +01:00
|
|
|
|
2022-01-13 19:20:14 +01:00
|
|
|
fn main() {
|
2022-02-19 21:41:26 +01:00
|
|
|
if os.args.len == 1 {
|
2022-02-21 20:51:41 +01:00
|
|
|
util.exit_with_message(1, 'No action provided.')
|
2022-02-19 21:41:26 +01:00
|
|
|
}
|
2022-02-17 22:00:46 +01:00
|
|
|
|
2022-02-19 21:41:26 +01:00
|
|
|
match os.args[1] {
|
2022-02-21 20:51:41 +01:00
|
|
|
'server' { server.server() ? }
|
2022-02-21 20:40:13 +01:00
|
|
|
'build' { build() ? }
|
2022-02-21 20:51:41 +01:00
|
|
|
else { util.exit_with_message(1, 'Unknown action: ${os.args[1]}') }
|
2022-02-19 21:41:26 +01:00
|
|
|
}
|
2022-01-13 19:20:14 +01:00
|
|
|
}
|