aboutsummaryrefslogtreecommitdiffstats
path: root/.extras
diff options
context:
space:
mode:
Diffstat (limited to '.extras')
-rwxr-xr-x.extras/hooks/post-commit6
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)