From 6933b1352ff0dc8f4a765c47f2d029de01b15500 Mon Sep 17 00:00:00 2001 From: Denis Rouzaud Date: Tue, 3 Dec 2024 08:24:03 +0100 Subject: [PATCH] fix prepare_commit.sh (#59713) * fix prepare_commit.sh * fix regex --- scripts/prepare_commit.sh | 2 +- scripts/verify_indentation.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/prepare_commit.sh b/scripts/prepare_commit.sh index 4df7bf1f19a3..af4e175829ae 100755 --- a/scripts/prepare_commit.sh +++ b/scripts/prepare_commit.sh @@ -120,7 +120,7 @@ for f in $MODIFIED; do esac # only run astyle on sipified directories, others are handled by clang-format (see .pre-commit-config.yaml) - if [[ $f =~ "^src/(core|gui|analysis|3d|server)" ]]; then + if [[ $f =~ ^src/(core|gui|analysis|3d|server) ]]; then m=$f.$REV.prepare cp "$f" "$m" ASTYLEPROGRESS=" [$i/$N]" astyle.sh "$f" diff --git a/scripts/verify_indentation.sh b/scripts/verify_indentation.sh index 892869e9054f..82d966232825 100755 --- a/scripts/verify_indentation.sh +++ b/scripts/verify_indentation.sh @@ -40,7 +40,7 @@ for f in $FILES; do esac # only run astyle on sipified directories, others are handled by clang-format (see .pre-commit-config.yaml) - if [[ $f =~ "^src/(core|gui|analysis|3d|server)" ]]; then + if [[ $f =~ ^src/(core|gui|analysis|3d|server) ]]; then m="$f.prepare" cp "$f" "$m" astyle.sh "$f"