use crate::commands::link::link; use crate::utils::parser::{self, env::get_install_env}; use crate::utils::shell; pub fn config(repo: &String, pkgname: &String) { let pkg_dir = &crate::commands::get_aeropkg_base().join(repo).join(pkgname); let pkg_md_path = &crate::commands::get_aeropkg_var().join(format!("{}/{}.md", repo, pkgname)); let config_script = match parser::get_config_script(pkg_md_path) { Ok(script) => script, Err(_) => { return } }; let full_env = get_install_env(repo, pkgname, pkg_md_path, "config"); shell::run_install_script(&config_script, pkg_dir, &full_env); shell::run_install_repo_stage_hook_script(repo, "config", &full_env); shell::run_install_stage_hook_script("download", &full_env); if !crate::commands::get_aeropkg_base().join(repo).join(pkgname).join("disabled").exists() { link(repo, pkgname) } }