hypr fix setup issues
This commit is contained in:
+78
-3
@@ -110,7 +110,82 @@ for pkgdir in term basic utils hypr kreation; do
|
||||
done
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 5. Makefile <-> setup script name consistency.
|
||||
# 5. Keep Caelestia on the upstream AUR Quickshell runtime.
|
||||
# ---------------------------------------------------------------------------
|
||||
echo "== Checking Quickshell package selection =="
|
||||
PACKAGE_FILES=()
|
||||
for pkgdir in term basic utils hypr kreation; do
|
||||
PACKAGE_FILES+=("setup/$pkgdir/packages.txt")
|
||||
done
|
||||
|
||||
has_package() {
|
||||
local target="$1" file
|
||||
shift
|
||||
for file in "$@"; do
|
||||
if awk -v target="$target" '
|
||||
{
|
||||
sub(/#.*/, "")
|
||||
gsub(/^[[:space:]]+|[[:space:]]+$/, "")
|
||||
sub(/^[^/]+\//, "")
|
||||
}
|
||||
$0 == target { found = 1 }
|
||||
END { exit(found ? 0 : 1) }
|
||||
' "$file"; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
has_aur_package() {
|
||||
local target="$1" file
|
||||
shift
|
||||
for file in "$@"; do
|
||||
if awk -v target="$target" '
|
||||
{
|
||||
sub(/#.*/, "")
|
||||
gsub(/^[[:space:]]+|[[:space:]]+$/, "")
|
||||
}
|
||||
$0 == "@aur" { in_aur = 1; next }
|
||||
/^@/ { in_aur = 0; next }
|
||||
in_aur && $0 == target { found = 1 }
|
||||
END { exit(found ? 0 : 1) }
|
||||
' "$file"; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
if has_package quickshell "${PACKAGE_FILES[@]}" && has_package quickshell-git "${PACKAGE_FILES[@]}"; then
|
||||
say_fail "package lists declare both quickshell and quickshell-git"
|
||||
else
|
||||
say_pass "no mutually exclusive quickshell packages declared"
|
||||
fi
|
||||
|
||||
if has_package noctalia-qs "${PACKAGE_FILES[@]}"; then
|
||||
say_fail "package lists must not install noctalia-qs for Caelestia"
|
||||
else
|
||||
say_pass "incompatible noctalia-qs provider is not declared"
|
||||
fi
|
||||
|
||||
if has_aur_package aur/quickshell-git "${PACKAGE_FILES[@]}"; then
|
||||
say_pass "quickshell-git is explicitly selected from the AUR"
|
||||
else
|
||||
say_fail "quickshell-git must use the explicit aur/quickshell-git target"
|
||||
fi
|
||||
|
||||
if awk '
|
||||
/^[[:space:]]*yay[[:space:]]+-S/ && /--aur/ && /--needed/ { found = 1 }
|
||||
END { exit(found ? 0 : 1) }
|
||||
' setup/lib/common.sh; then
|
||||
say_pass "AUR package installation uses yay --aur mode"
|
||||
else
|
||||
say_fail "AUR package installation does not use yay --aur mode"
|
||||
fi
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 6. Makefile <-> setup script name consistency.
|
||||
# Catches typos such as `setup/basic/setuo.sh`
|
||||
# (missing '/') in Makefile targets.
|
||||
# ---------------------------------------------------------------------------
|
||||
@@ -126,7 +201,7 @@ while IFS= read -r tok; do
|
||||
done < <(grep -P '^\t' Makefile | grep -oE 'setup/[_A-Za-z0-9./-]+\.sh' | sort -u)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 6. Makefile <-> stow package name consistency.
|
||||
# 7. Makefile <-> stow package name consistency.
|
||||
# Catches bugs such as `stow nvim` when the actual package dir is `term/`.
|
||||
# ---------------------------------------------------------------------------
|
||||
echo "== Checking Makefile stow targets reference real package dirs =="
|
||||
@@ -156,7 +231,7 @@ while IFS= read -r pkg; do
|
||||
done < <(grep -P '^\t' Makefile | grep -E '\bstow\b' | awk '{print $NF}' | sort -u)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# 7. Central theme drift guard: no hardcoded theme colors outside
|
||||
# 8. Central theme drift guard: no hardcoded theme colors outside
|
||||
# basic/.config/themes (plus declared mirrors). See
|
||||
# basic/.config/themes/scripts/sync-theme.sh.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user