diff options
author | Fedja Beader <fedja@protonmail.ch> | 2023-09-10 13:33:28 +0200 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2023-09-10 13:33:28 +0200 |
commit | 3f68449293de30d84e39fef761ca5a4734f99c32 (patch) | |
tree | b42fdeb4d513d47e2a1602f1b57876c7dc25317c /tools/ci/scripts/deheader.sh | |
parent | 1999cc4ec6a8d14730edb3c98dbf72011fce9ba6 (diff) | |
download | manaverse-3f68449293de30d84e39fef761ca5a4734f99c32.tar.gz manaverse-3f68449293de30d84e39fef761ca5a4734f99c32.tar.bz2 manaverse-3f68449293de30d84e39fef761ca5a4734f99c32.tar.xz manaverse-3f68449293de30d84e39fef761ca5a4734f99c32.zip |
Reduce number of grep invocations + prettify + wrap param expansion in quotes
Diffstat (limited to 'tools/ci/scripts/deheader.sh')
-rwxr-xr-x | tools/ci/scripts/deheader.sh | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/tools/ci/scripts/deheader.sh b/tools/ci/scripts/deheader.sh index 03ea0ee18..9914da900 100755 --- a/tools/ci/scripts/deheader.sh +++ b/tools/ci/scripts/deheader.sh @@ -22,21 +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" \ --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" \ + -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}" |