dotfiles/modules/01-packages.sh

43 lines
815 B
Bash
Executable File

#!/usr/bin/env bash
# Install paru if not present
if ! command -v paru &>/dev/null; then
echo "paru not found. Installing paru..."
git clone https://aur.archlinux.org/paru.git /tmp/paru
(cd /tmp/paru && makepkg -si --noconfirm)
fi
# List of packages to install (edit as needed)
PACKAGES=(
git
zsh
neovim
tmux
starship
fzf
ripgrep
bat
exa
zsh-autosuggestions
zsh-syntax-highlighting
zsh-completions
btop
pkgfile
inetutils
# Add more packages here
)
to_install=()
for pkg in "${PACKAGES[@]}"; do
if ! paru -Q "$pkg" &>/dev/null; then
to_install+=("$pkg")
fi
done
if [ "${#to_install[@]}" -gt 0 ]; then
paru -S --noconfirm "${to_install[@]}"
export DOTFILES_PACKAGES_UPDATED=1
else
echo "All packages already installed."
fi