chezmoi 新增Debian支援
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
zsh -i -c 'zinit update'
|
||||
vim +PlugInstall +qall
|
||||
nvim --headless "+Lazy! update" +qa
|
||||
if command -v zsh &> /dev/null; then
|
||||
zsh -i -c 'zinit update'
|
||||
fi
|
||||
if command -v vim &> /dev/null; then
|
||||
vim +PlugInstall +qall
|
||||
fi
|
||||
if command -v nvim &> /dev/null; then
|
||||
nvim --headless "+Lazy! update" +qa
|
||||
fi
|
||||
|
||||
{{ if not .noGUI }}
|
||||
{{ if and (eq .chezmoi.os "linux") (stat (print .chezmoi.homeDir "/.winscp")) }}
|
||||
|
||||
@@ -1,4 +1,25 @@
|
||||
{{ if eq .chezmoi.os "linux" -}}
|
||||
{{/* ---- 安裝腳本 ------------------------------------------------------- */ -}}
|
||||
|
||||
{{/* ==== Debian ======================================================== */ -}}
|
||||
{{ if eq .chezmoi.osRelease.id "debian" -}}
|
||||
|
||||
{{/* ---- 整理待安裝清單 -------------------------------------------------- */ -}}
|
||||
{{- $aptInstall := .packages.linux.debian.apt -}}
|
||||
apt_packages=( {{ $aptInstall | quoteList | join " " }} )
|
||||
|
||||
to_install_apt=()
|
||||
for package in "${apt_packages[@]}"; do
|
||||
to_install_apt+=("$package")
|
||||
done
|
||||
|
||||
echo " - Installing packages via apt: ${to_install_apt[@]}"
|
||||
if [ "$EUID" -ne 0 ]
|
||||
sudo apt install -y "${to_install_apt[@]}"
|
||||
else
|
||||
apt install -y "${to_install_apt[@]}"
|
||||
fi
|
||||
{{ end -}}
|
||||
|
||||
|
||||
{{/* ==== Arch Linux / Manjaro ========================================== */ -}}
|
||||
|
||||
Reference in New Issue
Block a user