From 4fc41d652c0bdbdee929e57c7725411175ad7bf4 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 9 Oct 2024 00:37:09 +0200 Subject: [PATCH] .githooks/pre-commit --- .githooks/pre-commit | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index a6f74760..92813774 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -10,9 +10,9 @@ echo "Run $0" if which minify > /dev/null; then MINIFY="" - [ -z "$MINIFY" ] && minify --help | grep -q '\-\-css' && MINIFY="ext" - [ -z "$MINIFY" ] && minify --help | grep -q '\-\-output' && MINIFY="out" - [ -z "$MINIFY" ] || git status --porcelain | sed 's/^ . //' | while read file; do + [ -z "$MINIFY" ] && minify --help | grep -q '\-\-css ' && MINIFY="ext" + [ -z "$MINIFY" ] && minify --help | grep -q '\-\-output ' && MINIFY="out" + [ -z "$MINIFY" ] || git status --porcelain|sed -E 's/^ *(\?\?|[A-Z]) +//' | while read file; do ext="" case "$file" in *.min.*) continue ;; -- 2.47.3