From 1d1be9bd23c16417e0c3be8eb358fbe44a0f5fe4 Mon Sep 17 00:00:00 2001 From: Bruce Perry Date: Wed, 4 Sep 2024 14:51:56 -0600 Subject: [PATCH] use perl instead of sed for style checks for portability for Mac --- .github/workflows/style/check_tabs.sh | 2 +- .github/workflows/style/check_trailing_whitespaces.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/style/check_tabs.sh b/.github/workflows/style/check_tabs.sh index 28cb74f24..f751e3147 100755 --- a/.github/workflows/style/check_tabs.sh +++ b/.github/workflows/style/check_tabs.sh @@ -21,7 +21,7 @@ find . -type d \( -name .git \ -a ! -name "*.lex.h" -a ! -name "*.lex.cpp" \) \ \) \ -exec grep -Iq . {} \; \ - -exec sed -i 's/\t/\ \ \ \ /g' {} + + -exec perl -i -pe's/\t/\ \ \ \ /g' {} + gitdiff=`git diff` diff --git a/.github/workflows/style/check_trailing_whitespaces.sh b/.github/workflows/style/check_trailing_whitespaces.sh index 5e54c5cbe..ce853b02d 100755 --- a/.github/workflows/style/check_trailing_whitespaces.sh +++ b/.github/workflows/style/check_trailing_whitespaces.sh @@ -21,7 +21,7 @@ find . -type d \( -name .git \ -a ! -name "*.lex.h" -a ! -name "*.lex.cpp" \) \ \) \ -exec grep -Iq . {} \; \ - -exec sed -i 's/[[:blank:]]\+$//g' {} + + -exec perl -i -pe's/[[:blank:]]+$//g' {} + gitdiff=`git diff`