From f34bba29f3a55b6fb0e77509a1aad8fd21c9ed66 Mon Sep 17 00:00:00 2001 From: aloslider <53711835+aloslider@users.noreply.github.com> Date: Wed, 22 Apr 2026 02:36:29 +0300 Subject: [PATCH] Add paru install --- ...n_onchange_before_10_install-packages.sh.tmpl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.chezmoiscripts/run_onchange_before_10_install-packages.sh.tmpl b/.chezmoiscripts/run_onchange_before_10_install-packages.sh.tmpl index ecb7f29..afee248 100755 --- a/.chezmoiscripts/run_onchange_before_10_install-packages.sh.tmpl +++ b/.chezmoiscripts/run_onchange_before_10_install-packages.sh.tmpl @@ -5,7 +5,7 @@ exit 0 set -euo pipefail -echo "Installing and updating packages..." +echo "Installing packages..." {{ if or (eq .chezmoi.osRelease.id "arch") (eq .chezmoi.osRelease.id "cachyos") }} sudo pacman -Sy --noconfirm @@ -18,10 +18,22 @@ fi {{ end }} if [[ ${#pkgs[@]} -gt 0 ]]; then - echo "Installing pacman packages" + echo "Installing pacman packages..." sudo pacman -S --noconfirm --needed "${pkgs[@]}" fi +# Install paru +if command -v paru >/dev/null 2>&1; then + echo "Paru is already installed." +else + sudo pacman -S --noconfirm --needed git base-devel + tmpdir=$(mktemp -d) + git clone https://aur.archlinux.org/paru.git "$tmpdir/paru" + makepkg --dir "$tmpdir/paru" -si --noconfirm + rm -rf "$tmpdir" +fi + +# Install AUR pkgs aur_pkgs=() {{ range .packages.aur }} if ! pacman -Q "{{ . }}" &>/dev/null; then