Updates for the void...

This commit is contained in:
2026-06-11 16:32:53 +02:00
parent 24db65b6ed
commit 69527e3d61
9 changed files with 53 additions and 213 deletions
+43 -13
View File
@@ -113,13 +113,47 @@ if [ "$DO_INSTALL" = true ]; then
fi
if [ "$DO_INSTALL" = true ]; then
# -----------------------------------------------------------------------------
## ADD NONFREE REPOS
# -----------------------------------------------------------------------------
echo "📦 Checking nonfree repositories..."
REPO_PACKAGES=(void-repo-nonfree)
# Only add multilib-nonfree on x86_64
if [ "$(uname -m)" = "x86_64" ]; then
REPO_PACKAGES+=(void-repo-multilib-nonfree)
fi
MISSING_REPOS=()
for repo in "${REPO_PACKAGES[@]}"; do
if ! xbps-query -p pkgver "$repo" >/dev/null 2>&1; then
MISSING_REPOS+=("$repo")
fi
done
if [ ${#MISSING_REPOS[@]} -eq 0 ]; then
echo "✅ Nonfree repositories already enabled."
else
echo "📦 Enabling repositories: ${MISSING_REPOS[*]}"
sudo xbps-install -Sy "${MISSING_REPOS[@]}"
fi
echo ""
# -----------------------------------------------------------------------------
## INSTALL REQUIRED PACKAGES
# -----------------------------------------------------------------------------
REQUIRED_PACKAGES=(
# system essentials
wget curl git unzip lf jq alacritty fzf
fd-find direnv ripgrep bat syncthing
build-essential make bear valgrind tree
ca-certificates gnupg libfuse2 rsync fish
fonts-symbola fonts-noto fonts-noto-color-emoji
fd ripgrep bat direnv base-devel make valgrind tree
ca-certificates gnupg fuse rsync fish-shell
noto-fonts-ttf noto-fonts-emoji
# void specific
xdotool wmctrl kanata tree-sitter-cli gitu
# lazydocker
)
MISSING_PACKAGES=()
@@ -127,11 +161,9 @@ if [ "$DO_INSTALL" = true ]; then
echo "🔍 Checking for missing packages..."
echo ""
# Check which packages are missing using dpkg
# Check which packages are missing using xbps-query
for pkg in "${REQUIRED_PACKAGES[@]}"; do
# dpkg-query checks for the installed status.
# We check for a non-zero exit status which indicates the package is NOT installed.
if ! dpkg-query -W -f='${Status}' "$pkg" 2>/dev/null | grep -q "install ok installed"; then
if ! xbps-query -p pkgver "$pkg" >/dev/null 2>&1; then
MISSING_PACKAGES+=("$pkg")
fi
done
@@ -139,13 +171,11 @@ if [ "$DO_INSTALL" = true ]; then
if [ ${#MISSING_PACKAGES[@]} -eq 0 ]; then
echo "✅ All required packages are already installed."
else
echo "📦 Updating package lists..."
# Update package lists before installing
sudo apt update
echo "📦 Syncing repository indexes..."
sudo xbps-install -S
echo "📦 Installing missing packages: ${MISSING_PACKAGES[*]}"
# Use sudo apt install for installing on Debian
sudo apt install "${MISSING_PACKAGES[@]}"
sudo xbps-install -y "${MISSING_PACKAGES[@]}"
fi
echo ""