Up.
This commit is contained in:
parent
bb07a38006
commit
5ee1baad2d
@ -6,14 +6,12 @@ packages=(
|
||||
curl
|
||||
direnv
|
||||
ranger
|
||||
starship
|
||||
tmux
|
||||
trash-cli
|
||||
unzip
|
||||
wget
|
||||
zip
|
||||
zoxide
|
||||
zsh
|
||||
)
|
||||
|
||||
{{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}}
|
||||
|
@ -1,9 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
ZIMDIR=${HOME}/.zim
|
||||
|
||||
echo "Installing Zim Framework"
|
||||
$(which zsh) -c "source ${ZIMDIR}/zimfw.zsh init -q"
|
||||
|
||||
exit 0
|
||||
|
59
home/.chezmoiscripts/run_onchange_50-install-zsh.sh.tmpl
Normal file
59
home/.chezmoiscripts/run_onchange_50-install-zsh.sh.tmpl
Normal file
@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
ZIMDIR=${HOME}/.zim
|
||||
|
||||
{{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}}
|
||||
|
||||
{{- /* we're on Arch based system */ -}}
|
||||
echo -e "\033[0;32m>>>>> Begin zsh installation <<<<<\033[0m"
|
||||
|
||||
## Update system
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo pacman -Syu --noconfirm
|
||||
{{- else }}
|
||||
pacman -Syu --noconfirm
|
||||
{{- end}}
|
||||
|
||||
## Install packages
|
||||
if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
sudo yay -S --noconfirm zsh starship
|
||||
{{- else }}
|
||||
yay -S --noconfirm zsh starship
|
||||
{{- end }}
|
||||
fi
|
||||
|
||||
|
||||
{{ else if (eq .chezmoi.osRelease.id "debian" "ubuntu") -}}
|
||||
|
||||
{{- /* we're on Debian based system */ -}}
|
||||
echo -e "\033[0;32m>>>>> Begin zsh installation <<<<<\033[0m"
|
||||
|
||||
## Update system
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
DEBIAN_FRONTEND=noninteractive sudo -E apt update
|
||||
DEBIAN_FRONTEND=noninteractive sudo -E apt upgrade --yes
|
||||
{{- else }}
|
||||
DEBIAN_FRONTEND=noninteractive apt update
|
||||
DEBIAN_FRONTEND=noninteractive apt upgrade --yes
|
||||
{{- end}}
|
||||
|
||||
## Install packages
|
||||
{{- if ne .chezmoi.username "root" }}
|
||||
DEBIAN_FRONTEND=noninteractive sudo -E apt-get install --yes --no-install-recommends --ignore-missing zsh
|
||||
{{- else }}
|
||||
DEBIAN_FRONTEND=noninteractive sudo -E apt-get install --yes --no-install-recommends --ignore-missing zsh
|
||||
{{- end }}
|
||||
|
||||
curl -sS https://starship.rs/install.sh | sh
|
||||
|
||||
{{- end }}
|
||||
|
||||
|
||||
echo -e "\033[0;32m>>>>> Installing Zim Framework <<<<<\033[0m"
|
||||
$(which zsh) -c "source ${ZIMDIR}/zimfw.zsh init -q"
|
||||
|
||||
echo -e "\033[0;32m>>>>> Finish zsh installation <<<<<\033[0m"
|
||||
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user