feat: init structure, implemented pacfiles

This commit is contained in:
2026-04-22 19:03:08 +02:00
commit 27b7cd3813
9 changed files with 951 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
#![feature(iterator_try_collect, once_cell_try)]
use std::io::Write;
use clap::Parser;
mod args;
mod commands;
mod sys;
fn main() -> anyhow::Result<()> {
// if unsafe { libc::geteuid() } == 0 {
// return Err(anyhow::anyhow!(
// "the program is not designed to runn as root, priviledge escalation is done by the program itself"
// ));
// }
let args = args::Args::parse();
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("trace"))
// .format(|buf, record| {
// writeln!(
// buf,
// "{}: {}",
// record.level(),
// record.args()
// )
// })
.format_timestamp(None)
.init();
match args.subcommand {
args::Command::Pacfiles => commands::pacfiles(&args),
args::Command::Dummy => unimplemented!(),
}
}