From a923c198bf3351f38ad9556ea23656a1442ff22b Mon Sep 17 00:00:00 2001 From: Anton Volnuhin Date: Tue, 30 May 2023 09:38:25 +0300 Subject: [PATCH] Fix ifs --- run_onchange_before_install_main_deps.sh.tmpl | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/run_onchange_before_install_main_deps.sh.tmpl b/run_onchange_before_install_main_deps.sh.tmpl index 6ee5b51..9a95657 100644 --- a/run_onchange_before_install_main_deps.sh.tmpl +++ b/run_onchange_before_install_main_deps.sh.tmpl @@ -14,7 +14,12 @@ $Green########################################################################## ## ## ###############################################################################$NC" -{{ if eq .chezmoi.osRelease.id "fedora" -}} +{{ if .chezmoi.os "darwin" -}} + bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + brew update + brew upgrade -y + +{{ else if eq .chezmoi.osRelease.id "fedora" -}} sudo dnf update -y {{ else if eq .chezmoi.osRelease.id "debian" "ubuntu" -}} @@ -24,11 +29,6 @@ $Green########################################################################## {{ else if eq .chezmoi.osRelease.id "arch" -}} sudo pacman -Syu --noconfirm -{{ else if .chezmoi.os "darwin" -}} - bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - brew update - brew upgrade -y - {{ end -}} @@ -42,7 +42,10 @@ $Green########################################################################## ###############################################################################$NC" sleep 3 -{{ if eq .chezmoi.osRelease.id "fedora" -}} +{{ if eq .chezmoi.os "darwin" -}} + brew install $BASE_PACKAGES + +{{ else if eq .chezmoi.osRelease.id "fedora" -}} sudo dnf install $BASE_PACKAGES kitty-terminfo util-linux-user -y {{ else if eq .chezmoi.osRelease.id "debian" "ubuntu" -}} @@ -51,9 +54,6 @@ sleep 3 {{ else if eq .chezmoi.osRelease "arch" -}} sudo pacman -Sy --noconfirm $BASE_PACKAGES kitty-terminfo -{{ else if eq .chezmoi.os "darwin" -}} - brew install $BASE_PACKAGES - {{ end -}} @@ -74,7 +74,6 @@ $Green########################################################################## bash <(curl -L https://nixos.org/nix/install) --no-daemon . ~/.nix-profile/etc/profile.d/nix.sh fi -{{ end -}} ################################################################################ @@ -108,6 +107,7 @@ fi sudo apt update {{ end -}} +{{ end -}} echo -e " @@ -120,7 +120,10 @@ $Green########################################################################## ###############################################################################$NC" sleep 3 -{{ if eq .chezmoi.osRelease.id "fedora" -}} +{{ if eq .chezmoi.os "darwin" -}} + brew install fish neovim $ACT_PACKAGES atuin jump -y + +{{ else if eq .chezmoi.osRelease.id "fedora" -}} sudo dnf install neovim fish $ACT_PACKAGES -y nix-env -iA nixpkgs.atuin nixpkgs.jump @@ -136,9 +139,6 @@ sleep 3 bash <(curl https://raw.githubusercontent.com/ellie/atuin/main/install.sh) fi -{{ else if eq .chezmoi.os "darwin" -}} - brew install fish neovim $ACT_PACKAGES atuin jump -y - {{ end -}}