You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
665 B
Rust
23 lines
665 B
Rust
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
|
|
#[tracing::instrument(level = "trace")]
|
|
pub async fn create_executor(os_cfg_path: PathBuf) -> AppResult<TaskExecutor> {
|
|
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))
|
|
}
|