add config (WIP)

This commit is contained in:
timeshifter
2023-01-14 16:56:07 +01:00
parent ce960a4e29
commit 1a9226384a
9 changed files with 122 additions and 7 deletions
+4 -3
View File
@@ -1,10 +1,11 @@
use anyhow::{Context, Result};
use pacdef::{args, Group, Pacdef};
use pacdef::{args, Config, Group, Pacdef};
fn main() -> Result<()> {
let args = args::get();
let groups = Group::load_from_dir()?;
let pacdef = Pacdef::new(args, groups);
let config = Config::load().context("loading config file")?;
let groups = Group::load(&config).context("loading groups")?;
let pacdef = Pacdef::new(args, config, groups);
pacdef.run_action_from_arg().context("running action")
}