Fixed the installation script to handle arch based distributions without systemd

This commit is contained in:
Gu://em_ 2026-07-08 18:49:08 +02:00
parent 1cdca4243b
commit 0f4af24823

View file

@ -544,22 +544,12 @@ install_packages() {
warn "Bulk install failed for group '${group}' — retrying per package"
for pkg in "${pkgs[@]}"; do
local tmp2; tmp2=$(mktemp)
if [[ $IS_TTY == true ]]; then
spinner_start " [${group}] $pkg"
if pacman_install "$pkg" >"$tmp2" 2>&1; then
spinner_start " [${group}] $pkg"
if pacman_install "$pkg" >"$tmp2" 2>&1; then
spinner_stop ok "[${group}] $pkg"; succeeded+=("$pkg")
else
else
spinner_stop fail "[${group}] $pkg"
warn "pacman output:"; cat "$tmp2" | indent; failed+=("$pkg")
fi
else
printf " ... [%s] %s\n" "$group" "$pkg"
if pacman_install "$pkg" >"$tmp2" 2>&1; then
ok "[${group}] $pkg"; succeeded+=("$pkg")
else
err "[${group}] $pkg"
warn "pacman output:"; cat "$tmp2" | indent; failed+=("$pkg")
fi
fi
rm -f "$tmp2"
done
@ -584,7 +574,12 @@ install_packages() {
# Build the set of groups that are handled specially so we can exclude them
# when iterating all .pkgs files for automatic groups.
local hw_groups=("${HW_CPU}-cpu" "${HW_GPU}-gpu")
# Here we add all known hardware group names. The unnecessary ones will be excluded
local hw_groups=(
intel-cpu amd-cpu
intel-gpu amd-gpu nvidia
)
local optional_group_names=()
local optional_file="$PACKAGES_DIR/optional.groups"
if [[ -f $optional_file ]]; then
@ -761,6 +756,14 @@ setup_waybar() {
enable_services() {
phase "Enabling services"
# Check systemd presence
which systemctl
if [ "$?" -ne 0 ]; then
warn "Systemd is not installed, skipping services activation"
info "You'll have to manually enable needed services"
return
fi
enable_service() {
local svc="$1"
if systemctl is-enabled "$svc" &>/dev/null; then