Adds support for chezmoi (#744)

This commit is contained in:
Philipp Weißmann
2021-07-19 07:29:34 +02:00
committed by GitHub
parent c891d109d2
commit 2c348090b7
3 changed files with 13 additions and 0 deletions

View File

@@ -69,6 +69,7 @@ pub enum Step {
BrewFormula,
Bin,
Cargo,
Chezmoi,
Chocolatey,
Choosenim,
Composer,

View File

@@ -293,6 +293,9 @@ fn run() -> Result<()> {
runner.execute(Step::Myrepos, "myrepos", || {
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::Vim, "vim", || vim::upgrade_vim(&base_dirs, &ctx))?;
runner.execute(Step::Vim, "Neovim", || vim::upgrade_neovim(&base_dirs, &ctx))?;

View File

@@ -268,6 +268,15 @@ pub fn run_tlmgr_update(ctx: &ExecutionContext) -> Result<()> {
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<()> {
let myrepos = utils::require("mr")?;
base_dirs.home_dir().join(".mrconfig").require()?;