From 6b91f97c93940efbed8125f029eefc829853ad63 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 20 Jun 2026 11:23:14 +0200 Subject: hooks: sync post-commit to flat package layout The tracked source lagged the installed hook: update it to match the flat top-level / layout and SBo/ archive dir actually in use. Co-Authored-By: Claude Opus 4.8 --- .extras/hooks/post-commit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.extras/hooks/post-commit b/.extras/hooks/post-commit index 8c6492b..9f92e3c 100755 --- a/.extras/hooks/post-commit +++ b/.extras/hooks/post-commit @@ -3,7 +3,7 @@ set -u REPO_ROOT=$(git rev-parse --show-toplevel) -SBO_DIR="$REPO_ROOT/.extras/SBo" +SBO_DIR="$REPO_ROOT/SBo" # Find packages whose .SlackBuild was added (A) or modified (M) in this commit. # git diff-tree output format: \t @@ -13,8 +13,8 @@ while IFS=$'\t' read -r status file; do [[ "$status" != "A" && "$status" != "M" ]] && continue dir=$(dirname "$file") base=$(basename "$file") - # Only process packages at SlackBuilds/ depth - [[ "$dir" =~ ^SlackBuilds/[^/]+$ ]] || continue + [[ "$dir" == "." ]] && continue # skip root-level files + [[ "$dir" == *"/"* ]] && continue # skip files deeper than one level [[ "$base" == *.SlackBuild ]] || continue PACKAGES+=("$dir") done < <(git diff-tree --no-commit-id -r --name-status HEAD) -- cgit v1.2.3