pub mod error; pub(crate) mod utils; use std::path::PathBuf; use distro::{distro_config::DistroConfig, loader::OSConfigLoader}; use error::AppResult; use task::task_executor::TaskExecutor; pub use utils::generate_script_files; pub mod distro; pub mod task; /// Creates a new executor with the given os config for the current distro pub async fn create_executor(os_cfg_path: PathBuf) -> AppResult { let distro_config = DistroConfig::load().await?; let os_config = OSConfigLoader::new(os_cfg_path, &distro_config) .load() .await?; Ok(TaskExecutor::new(os_config, distro_config)) }