fix prepare_commit.sh (#59713)

* fix prepare_commit.sh

* fix regex
This commit is contained in:
Denis Rouzaud 2024-12-03 08:24:03 +01:00 committed by GitHub
parent a6946c6909
commit 6933b1352f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -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"

View File

@ -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"