blob: 1fdcebfc667c643f7f5bfc4989fef6841e6879ee (
plain) (
tree)
|
|
use backup::Backup;
use config::Config;
use packages::{pacman::Pacman, PackageManager};
use storage::save_index;
mod backup;
mod config;
mod error;
mod pathinfo;
mod packages;
mod storage;
fn main() -> anyhow::Result<()> {
let mut cfg = Config::load()?;
cfg.user.push("fx".to_string());
cfg.directories.push("~/.config/nvim".to_string());
cfg.directories.push("~/.config/hypr".to_string());
let toml = toml::to_string(&cfg)?;
println!("{toml}");
let pacman = Pacman;
let pkgs = pacman.get_installed();
let backup = Backup::create(&cfg, pkgs)?;
// println!("{backup:#?}");
save_index(backup);
// let fi = FileInfo::new("~/.config/nvim", &cfg)?;
// println!("{:?}", fi.get_absolute_path());
Ok(())
}
|