Files
dotfiles/install.d/12-pacman.sh
2026-02-13 15:13:12 +00:00

36 lines
767 B
Bash
Executable File

#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# (distros with pacman only) Install core pacman packages.
#
# pacman only
[[ "$DOTS_PKG" != "pacman" ]] && { log_skip "Not using pacman"; return 0; }
pacman_packages=(
ca-certificates
curl
git
gnupg
wget
base-devel
)
sudo pacman -Sy --noconfirm
sudo pacman -S --noconfirm --needed "${pacman_packages[@]}"
unset pacman_packages
# Install yay (AUR helper)
if ! command -v yay &>/dev/null; then
log_info "Installing yay..."
git clone https://aur.archlinux.org/yay.git /tmp/yay
(cd /tmp/yay && makepkg -si --noconfirm)
rm -rf /tmp/yay
fi
pacman --version
yay --version
log_pass "pacman packages installed"