6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 1 | mod artifacts; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 2 | mod cli; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 3 | mod client; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 4 | mod config; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 5 | mod daemon; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 6 | mod history; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 7 | mod hook; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 8 | mod paths; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 9 | mod proto; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 10 | mod run; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 11 | mod sched; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 12 | mod store; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 13 | mod sys; |
caac091f257a | atagen | 2026-10-04 11:41 UTC | 14 | #[cfg(target_os = "linux")] |
caac091f257a | atagen | 2026-10-04 11:41 UTC | 15 | mod systemd; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 16 | mod units; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 17 | |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 18 | use pound::Parse; |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 19 | |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 20 | fn main() { |
caac091f257a | atagen | 2026-10-04 11:41 UTC | 21 | #[cfg(target_os = "linux")] |
caac091f257a | atagen | 2026-10-04 11:41 UTC | 22 | if let Some(code) = systemd::exec() { |
caac091f257a | atagen | 2026-10-04 11:41 UTC | 23 | std::process::exit(code); |
caac091f257a | atagen | 2026-10-04 11:41 UTC | 24 | } |
56a853ebf254 | atagen | 2026-09-27 03:59 UTC | 25 | // a typo must not exit 2, that's a blocking pretooluse verdict and would |
56a853ebf254 | atagen | 2026-09-27 03:59 UTC | 26 | // wall off every bash call in every session |
9117440444eb | atagen | 2026-10-26 02:44 UTC | 27 | let rabt = cli::Rabt::parse(); |
9117440444eb | atagen | 2026-10-26 02:44 UTC | 28 | let cfg = if matches!(&rabt, cli::Rabt::Daemon) { |
9117440444eb | atagen | 2026-10-26 02:44 UTC | 29 | config::Config::load() |
9117440444eb | atagen | 2026-10-26 02:44 UTC | 30 | } else { |
9117440444eb | atagen | 2026-10-26 02:44 UTC | 31 | let cwd = std::env::current_dir().unwrap_or_else(|_| "/".into()); |
9117440444eb | atagen | 2026-10-26 02:44 UTC | 32 | config::Config::load_for(&cwd) |
9117440444eb | atagen | 2026-10-26 02:44 UTC | 33 | } |
9117440444eb | atagen | 2026-10-26 02:44 UTC | 34 | .unwrap_or_else(|e| { |
fdad58f8133a | atagen | 2026-10-25 23:14 UTC | 35 | eprintln!("roundabout: bad config, using defaults. {e}"); |
56a853ebf254 | atagen | 2026-09-27 03:59 UTC | 36 | config::Config::default() |
56a853ebf254 | atagen | 2026-09-27 03:59 UTC | 37 | }); |
9117440444eb | atagen | 2026-10-26 02:44 UTC | 38 | std::process::exit(cli::dispatch(&cfg, rabt)); |
6f5b84fad3ef | atagen | 2026-09-27 03:59 UTC | 39 | } |