summaryrefslogtreecommitdiff
path: root/tools/ci/scripts/deheaderS.sh
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2023-09-10 13:33:28 +0200
committerFedja Beader <fedja@protonmail.ch>2023-09-10 13:33:28 +0200
commit3f68449293de30d84e39fef761ca5a4734f99c32 (patch)
treeb42fdeb4d513d47e2a1602f1b57876c7dc25317c /tools/ci/scripts/deheaderS.sh
parent1999cc4ec6a8d14730edb3c98dbf72011fce9ba6 (diff)
downloadplus-3f68449293de30d84e39fef761ca5a4734f99c32.tar.gz
plus-3f68449293de30d84e39fef761ca5a4734f99c32.tar.bz2
plus-3f68449293de30d84e39fef761ca5a4734f99c32.tar.xz
plus-3f68449293de30d84e39fef761ca5a4734f99c32.zip
Reduce number of grep invocations + prettify + wrap param expansion in quotes
Diffstat (limited to 'tools/ci/scripts/deheaderS.sh')
-rwxr-xr-xtools/ci/scripts/deheaderS.sh40
1 files changed, 21 insertions, 19 deletions
diff --git a/tools/ci/scripts/deheaderS.sh b/tools/ci/scripts/deheaderS.sh
index 6f72ddb50..b9a6730c0 100755
--- a/tools/ci/scripts/deheaderS.sh
+++ b/tools/ci/scripts/deheaderS.sh
@@ -22,22 +22,24 @@ fi
echo $1 >>${LOGFILE}
echo $1
-${dir}/deheader -q -i "\"debug.h\"" \
--i "\"utils/checkutils.h\"" \
--i "\"utils/sdlcheckutils.h\"" \
--i "\"sdlshared.h\"" \
--i "\"localconsts.h\"" \
--i "\"utils/fuzzer.h\"" \
--i "\"$name\"" \
--c "$CXX" \
--d "$FLAGS" \
--s "-std=gnu++1z" \
--S "-std=gnu++1z" \
--m "-c -Werror -Wall -Wextra -Wundef -Wmissing-declarations -DUCHAR_TYPE=uint16_t -DLOCALEDIR=\\\"\\\" -I/usr/include $INCLUDES -I${dir}/src" $1 2>&1 | \
-grep -v "deheader: ./src/net/sdltcpnet.cpp has more than one inclusion of <netinet/tcp.h>" | \
-grep -v "deheader: remove <netinet/tcp.h> from ./src/net/sdltcpnet.cpp" | \
-grep -v "deheader: remove <climits> from ./src/resources/db/unitsdb.cpp" | \
-grep -v "portability requires" | \
-grep -v "SDL2_rotozoom.cpp" | \
-grep -v "doctest.h" | \
-tee -a ${LOGFILE}
+"${dir}/deheader" -q \
+ -i "\"debug.h\"" \
+ -i "\"utils/checkutils.h\"" \
+ -i "\"utils/sdlcheckutils.h\"" \
+ -i "\"sdlshared.h\"" \
+ -i "\"localconsts.h\"" \
+ -i "\"utils/fuzzer.h\"" \
+ -i "\"$name\"" \
+ -c "$CXX" \
+ -d "$FLAGS" \
+ -s "-std=gnu++1z" \
+ -S "-std=gnu++1z" \
+ -m "-c -Werror -Wall -Wextra -Wundef -Wmissing-declarations -DUCHAR_TYPE=uint16_t -DLOCALEDIR=\\\"\\\" -I/usr/include $INCLUDES -I${dir}/src" \
+ "$1" 2>&1 \
+ | grep -v -e "deheader: ./src/net/sdltcpnet.cpp has more than one inclusion of <netinet/tcp.h>" \
+ -e "deheader: remove <netinet/tcp.h> from ./src/net/sdltcpnet.cpp" \
+ -e "deheader: remove <climits> from ./src/resources/db/unitsdb.cpp" \
+ -e "portability requires" \
+ -e "SDL2_rotozoom.cpp" \
+ -e "doctest.h" \
+ | tee -a "${LOGFILE}"