blob: e0b3758227871b64899706d9bb0dbc6794e43c43 (
plain) (
tree)
|
|
use backup::Backup;
use config::Config;
use packages::{pacman::Pacman, PackageManager};
mod backup;
mod config;
mod error;
mod pathinfo;
mod packages;
fn main() -> color_eyre::Result<()> {
color_eyre::install()?;
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());
cfg.root = "./backup".to_string();
let pacman = Pacman;
let pkgs = pacman.get_installed();
let backup = Backup::create(&cfg, pkgs)?;
// println!("{backup:#?}");
backup.save(&cfg)?;
Backup::get(&cfg, None)?;
// let fi = FileInfo::new("~/.config/nvim", &cfg)?;
// println!("{:?}", fi.get_absolute_path());
Ok(())
}
|