[ -z "$MINIFY" ] && minify --help 2>&1| grep -q '\-\-css' && MINIFY="ext"
[ -z "$MINIFY" ] && minify --help 2>&1| grep -q '\-\-output' && MINIFY="out"
[ -n "$MINIFY" ] || exit
-git status --porcelain|sed -E 's/^ *(\?\?|[A-Z]) +//'
+#git status --porcelain|sed -E 's/^ *(\?\?|[A-Z]) +//'
#exec echo BYE
git status --porcelain|sed -E 's/^ *(\?\?|[A-Z]) +//' | while read file; do
--- /dev/null
+#!/bin/bash
+# setup-hooks.sh
+
+# Ensure this script is run from the root of the repository
+REPO_ROOT=$(git rev-parse --show-toplevel)
+[ -n "$REPO_ROOT" ] || exit
+
+HOOKS_DIR="$REPO_ROOT/.githooks"
+GIT_HOOKS_DIR="$REPO_ROOT/.git/hooks"
+
+# Copy or symlink the pre-commit hook
+#echo "Setting up Git hooks..."
+[ -d "$HOOKS_DIR" ] || exit
+
+for hook in "$HOOKS_DIR"/*; do
+ hook_name=$(basename "$hook")
+ [ -e "$GIT_HOOKS_DIR/$hook_name" ] && stat --format '%N' "$GIT_HOOKS_DIR/$hook_name" \
+ | grep -q "\-> '$HOOKS_DIR/$hook_name'$" \
+ && continue
+ echo " Installing Git hook $hook_name"
+ ln -sf "$HOOKS_DIR/$hook_name" "$GIT_HOOKS_DIR/$hook_name"
+done
+# NB 08.10.24 else
+# NB 08.10.24 echo "No hooks found in $HOOKS_DIR."