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"