Submodules

This commit is contained in:
nora 2024-01-18 19:45:39 +01:00
commit 43d792e148
10 changed files with 712 additions and 0 deletions

22
src/main.rs Normal file
View file

@ -0,0 +1,22 @@
mod submodule;
mod utils;
#[macro_use]
extern crate tracing;
use color_eyre::{eyre::Context, Result};
use tracing_subscriber::EnvFilter;
fn main() -> Result<()> {
tracing_subscriber::fmt().with_env_filter(EnvFilter::from_default_env()).init();
let sub_config =
std::fs::read_to_string("submodules.toml").wrap_err("reading ./submodules.toml")?;
let sub_config =
submodule::Submodules::parse(&sub_config).wrap_err("invalid submodules.toml")?;
submodule::sync(&sub_config).wrap_err("syncing subtrees")?;
info!("Hello, world!");
Ok(())
}