Adds support for chezmoi (#744)
This commit is contained in:
@@ -69,6 +69,7 @@ pub enum Step {
|
|||||||
BrewFormula,
|
BrewFormula,
|
||||||
Bin,
|
Bin,
|
||||||
Cargo,
|
Cargo,
|
||||||
|
Chezmoi,
|
||||||
Chocolatey,
|
Chocolatey,
|
||||||
Choosenim,
|
Choosenim,
|
||||||
Composer,
|
Composer,
|
||||||
|
|||||||
@@ -293,6 +293,9 @@ fn run() -> Result<()> {
|
|||||||
runner.execute(Step::Myrepos, "myrepos", || {
|
runner.execute(Step::Myrepos, "myrepos", || {
|
||||||
generic::run_myrepos_update(&base_dirs, run_type)
|
generic::run_myrepos_update(&base_dirs, run_type)
|
||||||
})?;
|
})?;
|
||||||
|
runner.execute(Step::Chezmoi, "chezmoi", || {
|
||||||
|
generic::run_chezmoi_update(&base_dirs, run_type)
|
||||||
|
})?;
|
||||||
runner.execute(Step::Jetpack, "jetpack", || generic::run_jetpack(run_type))?;
|
runner.execute(Step::Jetpack, "jetpack", || generic::run_jetpack(run_type))?;
|
||||||
runner.execute(Step::Vim, "vim", || vim::upgrade_vim(&base_dirs, &ctx))?;
|
runner.execute(Step::Vim, "vim", || vim::upgrade_vim(&base_dirs, &ctx))?;
|
||||||
runner.execute(Step::Vim, "Neovim", || vim::upgrade_neovim(&base_dirs, &ctx))?;
|
runner.execute(Step::Vim, "Neovim", || vim::upgrade_neovim(&base_dirs, &ctx))?;
|
||||||
|
|||||||
@@ -268,6 +268,15 @@ pub fn run_tlmgr_update(ctx: &ExecutionContext) -> Result<()> {
|
|||||||
command.check_run()
|
command.check_run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn run_chezmoi_update(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
||||||
|
let chezmoi = utils::require("chezmoi")?;
|
||||||
|
base_dirs.home_dir().join(".local/share/chezmoi").require()?;
|
||||||
|
|
||||||
|
print_separator("chezmoi");
|
||||||
|
|
||||||
|
run_type.execute(&chezmoi).arg("update").check_run()
|
||||||
|
}
|
||||||
|
|
||||||
pub fn run_myrepos_update(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
pub fn run_myrepos_update(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
||||||
let myrepos = utils::require("mr")?;
|
let myrepos = utils::require("mr")?;
|
||||||
base_dirs.home_dir().join(".mrconfig").require()?;
|
base_dirs.home_dir().join(".mrconfig").require()?;
|
||||||
|
|||||||
Reference in New Issue
Block a user