hypr overhaul

This commit is contained in:
2026-09-20 14:40:45 +02:00
parent 85fc7f0e4a
commit 384cd84a6e
10 changed files with 215 additions and 58 deletions
+20 -11
View File
@@ -80,24 +80,33 @@ fi
# 4. packages.txt parsing sanity (mirrors each setup.sh read_packages).
# ---------------------------------------------------------------------------
echo "== Checking packages.txt markers =="
for pkgdir in term basic utils; do
if ! [[ -f "$pkgdir/packages.txt" ]]; then
say_fail "$pkgdir/packages.txt missing"
for pkgdir in term basic utils hypr; do
# term/ and hypr/ keep packages.txt + setup.sh inside scripts/ so stowing
# the top-level dir only creates .config/ symlinks.
if [[ "$pkgdir" == "term" || "$pkgdir" == "hypr" ]]; then
PKG_FILE="$pkgdir/scripts/packages.txt"
SETUP_FILE="$pkgdir/scripts/setup.sh"
else
PKG_FILE="$pkgdir/packages.txt"
SETUP_FILE="$pkgdir/setup.sh"
fi
if ! [[ -f "$PKG_FILE" ]]; then
say_fail "$PKG_FILE missing"
continue
fi
if grep -q '^@pacman' "$pkgdir/packages.txt"; then
say_pass "$pkgdir/packages.txt declares @pacman section"
if grep -q '^@pacman' "$PKG_FILE"; then
say_pass "$PKG_FILE declares @pacman section"
else
say_fail "$pkgdir/packages.txt missing @pacman marker"
say_fail "$PKG_FILE missing @pacman marker"
fi
# every @aur/@npm marker must be matched by a real consumer in setup.sh
for marker in '@aur' '@npm'; do
if grep -q "^$marker" "$pkgdir/packages.txt"; then
grep -q "$marker" "$pkgdir/setup.sh" \
&& say_pass "$pkgdir/packages.txt $marker handled by $pkgdir/setup.sh" \
|| say_fail "$pkgdir/packages.txt uses $marker but $pkgdir/setup.sh does not handle it"
if grep -q "^$marker" "$PKG_FILE"; then
grep -q "$marker" "$SETUP_FILE" \
&& say_pass "$PKG_FILE $marker handled by $SETUP_FILE" \
|| say_fail "$PKG_FILE uses $marker but $SETUP_FILE does not handle it"
else
say_pass "$pkgdir/packages.txt has no $marker section"
say_pass "$PKG_FILE has no $marker section"
fi
done
done