From 0598cb7b71b00a2de1966b07b7b011fd93fce26d Mon Sep 17 00:00:00 2001 From: Yuan Chiu Date: Sat, 3 May 2025 01:42:36 +0800 Subject: [PATCH] =?UTF-8?q?linux=20install=20pacman=20=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E5=BC=B7=E5=88=B6=E6=80=A7=E5=AE=89=E8=A3=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .chezmoidata/packages.toml | 2 +- .../run_onchange_before_linux-install-packages.sh.tmpl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.chezmoidata/packages.toml b/.chezmoidata/packages.toml index 8869004..615a38e 100644 --- a/.chezmoidata/packages.toml +++ b/.chezmoidata/packages.toml @@ -58,11 +58,11 @@ pacman_force = [ 'llvm', 'llvm-libs', 'sudo', + 'git', ] pacman = [ 'chezmoi', - 'git', 'lazygit', 'base-devel', 'fakeroot', diff --git a/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl index 0108693..1a0bdaf 100644 --- a/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl +++ b/.chezmoiscripts/run_onchange_before_linux-install-packages.sh.tmpl @@ -130,7 +130,7 @@ wait_for_pacman_unlock if [[ ${#to_install_pacmanForce[@]} -gt 0 ]]; then echo " - Installing missing packages via pacman: ${to_install_pacmanForce[@]}" - sudo pacman -Sy --needed --noconfirm "${to_install_pacmanForce[@]}" + sudo pacman -Sy --needed --noconfirm --overwrite \* "${to_install_pacmanForce[@]}" else sudo pacman -Sy fi @@ -147,7 +147,7 @@ done if [[ ${#to_install_pacman[@]} -gt 0 ]]; then echo " - Installing missing packages via pacman: ${to_install_pacman[@]}" - sudo pacman -S --needed --noconfirm "${to_install_pacman[@]}" + sudo pacman -S --needed --noconfirm --overwrite \* "${to_install_pacman[@]}" fi # 等待鎖定檔案被移除