diff options
| author | Danilo M. <danix@danix.xyz> | 2026-06-20 11:23:14 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-06-20 11:23:14 +0200 |
| commit | 6b91f97c93940efbed8125f029eefc829853ad63 (patch) | |
| tree | 8a684da541964f046889cae38d70e3453889dc45 | |
| parent | 414bc83665e679a43922036d8b367b793d1b6a42 (diff) | |
| download | my-slackbuilds-6b91f97c93940efbed8125f029eefc829853ad63.tar.gz my-slackbuilds-6b91f97c93940efbed8125f029eefc829853ad63.zip | |
hooks: sync post-commit to flat package layout
The tracked source lagged the installed hook: update it to match the
flat top-level <pkg>/ layout and SBo/ archive dir actually in use.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| -rwxr-xr-x | .extras/hooks/post-commit | 6 |
1 files 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: <status>\t<file> @@ -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/<pkg> 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) |
