Fixed the installation script to handle arch based distributions without systemd
This commit is contained in:
parent
1cdca4243b
commit
0f4af24823
1 changed files with 17 additions and 14 deletions
|
|
@ -544,22 +544,12 @@ install_packages() {
|
||||||
warn "Bulk install failed for group '${group}' — retrying per package"
|
warn "Bulk install failed for group '${group}' — retrying per package"
|
||||||
for pkg in "${pkgs[@]}"; do
|
for pkg in "${pkgs[@]}"; do
|
||||||
local tmp2; tmp2=$(mktemp)
|
local tmp2; tmp2=$(mktemp)
|
||||||
if [[ $IS_TTY == true ]]; then
|
spinner_start " [${group}] $pkg"
|
||||||
spinner_start " [${group}] $pkg"
|
if pacman_install "$pkg" >"$tmp2" 2>&1; then
|
||||||
if pacman_install "$pkg" >"$tmp2" 2>&1; then
|
|
||||||
spinner_stop ok "[${group}] $pkg"; succeeded+=("$pkg")
|
spinner_stop ok "[${group}] $pkg"; succeeded+=("$pkg")
|
||||||
else
|
else
|
||||||
spinner_stop fail "[${group}] $pkg"
|
spinner_stop fail "[${group}] $pkg"
|
||||||
warn "pacman output:"; cat "$tmp2" | indent; failed+=("$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
|
fi
|
||||||
rm -f "$tmp2"
|
rm -f "$tmp2"
|
||||||
done
|
done
|
||||||
|
|
@ -584,7 +574,12 @@ install_packages() {
|
||||||
|
|
||||||
# Build the set of groups that are handled specially so we can exclude them
|
# Build the set of groups that are handled specially so we can exclude them
|
||||||
# when iterating all .pkgs files for automatic groups.
|
# 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_group_names=()
|
||||||
local optional_file="$PACKAGES_DIR/optional.groups"
|
local optional_file="$PACKAGES_DIR/optional.groups"
|
||||||
if [[ -f $optional_file ]]; then
|
if [[ -f $optional_file ]]; then
|
||||||
|
|
@ -761,6 +756,14 @@ setup_waybar() {
|
||||||
enable_services() {
|
enable_services() {
|
||||||
phase "Enabling 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() {
|
enable_service() {
|
||||||
local svc="$1"
|
local svc="$1"
|
||||||
if systemctl is-enabled "$svc" &>/dev/null; then
|
if systemctl is-enabled "$svc" &>/dev/null; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue