feat debian over 13 trixie 可用原生套件安裝,不需手動處理
This commit is contained in:
parent
e32b7a10a5
commit
4a89a290b9
@ -3,6 +3,7 @@
|
|||||||
brews = [
|
brews = [
|
||||||
'chezmoi',
|
'chezmoi',
|
||||||
'git',
|
'git',
|
||||||
|
'lazygit',
|
||||||
'zsh',
|
'zsh',
|
||||||
'vim',
|
'vim',
|
||||||
'neovim',
|
'neovim',
|
||||||
@ -41,6 +42,11 @@ apt = [
|
|||||||
'gcc',
|
'gcc',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
apt_13 = [
|
||||||
|
'neovim',
|
||||||
|
'lazygit',
|
||||||
|
]
|
||||||
|
|
||||||
# Arch Linux -------------------------------------------------------------------
|
# Arch Linux -------------------------------------------------------------------
|
||||||
[packages.linux.arch]
|
[packages.linux.arch]
|
||||||
pacman_force = [
|
pacman_force = [
|
||||||
@ -53,6 +59,7 @@ pacman = [
|
|||||||
'chezmoi',
|
'chezmoi',
|
||||||
'sudo',
|
'sudo',
|
||||||
'git',
|
'git',
|
||||||
|
'lazygit',
|
||||||
'base-devel',
|
'base-devel',
|
||||||
'fakeroot',
|
'fakeroot',
|
||||||
'gcc',
|
'gcc',
|
||||||
@ -99,6 +106,7 @@ pacman = [
|
|||||||
'chezmoi',
|
'chezmoi',
|
||||||
'yay',
|
'yay',
|
||||||
'git',
|
'git',
|
||||||
|
'lazygit',
|
||||||
'base-devel',
|
'base-devel',
|
||||||
'fakeroot',
|
'fakeroot',
|
||||||
'gcc',
|
'gcc',
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
|
|
||||||
{{/* ---- 整理待安裝清單 -------------------------------------------------- */ -}}
|
{{/* ---- 整理待安裝清單 -------------------------------------------------- */ -}}
|
||||||
{{- $aptInstall := .packages.linux.debian.apt -}}
|
{{- $aptInstall := .packages.linux.debian.apt -}}
|
||||||
|
{{- if ge .chezmoi.osRelease.versionID 13 -}}
|
||||||
|
{{- $aptInstall := concat .packages.linux.debian.apt .packages.linux.debian.apt_13 -}}
|
||||||
|
{{- end -}}
|
||||||
apt_packages=( {{ $aptInstall | quoteList | join " " }} )
|
apt_packages=( {{ $aptInstall | quoteList | join " " }} )
|
||||||
|
|
||||||
to_install_apt=()
|
to_install_apt=()
|
||||||
@ -22,7 +25,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
{{/* 手動安裝 neovim 0.11.1 */ -}}
|
{{/* 手動安裝 neovim 0.11.1 */ -}}
|
||||||
{{ if and (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.arch "amd64") }}
|
{{ if and (eq .chezmoi.osRelease.id "debian") (eq .chezmoi.arch "amd64") (le .chezmoi.osRelease.versionID 12) }}
|
||||||
curl -LO https://github.com/neovim/neovim/releases/download/v0.11.1/nvim-linux-x86_64.appimage
|
curl -LO https://github.com/neovim/neovim/releases/download/v0.11.1/nvim-linux-x86_64.appimage
|
||||||
chmod u+x nvim-linux-x86_64.appimage
|
chmod u+x nvim-linux-x86_64.appimage
|
||||||
./nvim-linux-x86_64.appimage --appimage-extract
|
./nvim-linux-x86_64.appimage --appimage-extract
|
||||||
@ -34,8 +37,21 @@ fi
|
|||||||
rm -r nvim-linux-x86_64.appimage squashfs-root
|
rm -r nvim-linux-x86_64.appimage squashfs-root
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
{{/* 手動安裝 lazygit */ -}}
|
||||||
|
{{ if and (eq .chezmoi.osRelease.id "debian") (le .chezmoi.osRelease.versionID 12) }}
|
||||||
|
LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | \grep -Po '"tag_name": *"v\K[^"]*')
|
||||||
|
curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz"
|
||||||
|
tar xf lazygit.tar.gz lazygit
|
||||||
|
if [ "$EUID" -ne 0 ]; then
|
||||||
|
sudo install lazygit -D -t /usr/local/bin/
|
||||||
|
else
|
||||||
|
install lazygit -D -t /usr/local/bin/
|
||||||
|
fi
|
||||||
|
rm -rf lazygit.tar.gz lazygit
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{/* ==== Arch Linux / Manjaro ========================================== */ -}}
|
{{/* ==== Arch Linux / Manjaro ========================================== */ -}}
|
||||||
{{ if or (eq .chezmoi.osRelease.id "manjaro") (eq .chezmoi.osRelease.id "arch") -}}
|
{{ if or (eq .chezmoi.osRelease.id "manjaro") (eq .chezmoi.osRelease.id "arch") -}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user