blob: d5ccb7520c2a6cbdcc6dff0f919ae8fd238a267b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
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)?;
let index = Backup::get_index(&cfg, None)?;
println!("{index:#?}");
// let fi = FileInfo::new("~/.config/nvim", &cfg)?;
// println!("{:?}", fi.get_absolute_path());
Ok(())
}
|