Skip to content

Commit

Permalink
Use brew package of chezmoi
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0x committed May 30, 2024
1 parent 18bf643 commit e23acec
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions _install/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,6 @@ async function setupUnix(os: "linux" | "darwin") {
Deno.exit(1);
}

const chezomiBinDir = path.join(homeDir, ".local", "bin");
const chezmoi = path.join(chezomiBinDir, "chezmoi");
if (!await fs.exists(chezmoi)) {
await $`sh`
.stdinText(`sh -c "$(curl -fsLS get.chezmoi.io)" -- -b ${chezomiBinDir}`);
}

if (!await fs.exists(brew)) {
await $`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`;
}
Expand All @@ -87,7 +80,8 @@ async function setupUnix(os: "linux" | "darwin") {
.stdinText(`
export PATH=$PATH:${scoopShimDir}
eval $("${brew}" shellenv)
"${chezmoi}" init --verbose --apply ${account}
BREW_NO_AUTO_UPDATE=1 "${brew}" install chezmoi
chezmoi init --verbose --apply ${account}
`)
.clearEnv()
.env({
Expand Down

0 comments on commit e23acec

Please sign in to comment.