summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
new file mode 100644
index 0000000..1fdcebf
--- /dev/null
+++ b/src/main.rs
@@ -0,0 +1,32 @@
1use backup::Backup;
2use config::Config;
3use packages::{pacman::Pacman, PackageManager};
4use storage::save_index;
5
6mod backup;
7mod config;
8mod error;
9mod pathinfo;
10mod packages;
11mod storage;
12
13fn main() -> anyhow::Result<()> {
14 let mut cfg = Config::load()?;
15 cfg.user.push("fx".to_string());
16 cfg.directories.push("~/.config/nvim".to_string());
17 cfg.directories.push("~/.config/hypr".to_string());
18 let toml = toml::to_string(&cfg)?;
19 println!("{toml}");
20
21 let pacman = Pacman;
22 let pkgs = pacman.get_installed();
23
24 let backup = Backup::create(&cfg, pkgs)?;
25 // println!("{backup:#?}");
26
27 save_index(backup);
28
29 // let fi = FileInfo::new("~/.config/nvim", &cfg)?;
30 // println!("{:?}", fi.get_absolute_path());
31 Ok(())
32}