mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-04-28 13:17:58 +03:00
simplify clang-format script (#5274)
checked that -print0 & -0 also exist in apple's manpages
This commit is contained in:
parent
1e51f1e162
commit
ef8fa17e7c
1 changed files with 4 additions and 5 deletions
|
@ -18,12 +18,11 @@
|
|||
# ! -path "soh/assets/*"
|
||||
# asset headers are autogenerated, don't fight them
|
||||
#
|
||||
# | sed 's| |\\ |g'
|
||||
# pipe the result of find into sed to
|
||||
# ensure all the paths returned by find have spaces escaped
|
||||
# -print0
|
||||
# separate paths with NUL bytes, avoiding issues with spaces in paths
|
||||
#
|
||||
# | xargs clang-format-14 -i
|
||||
# | xargs -0 clang-format-14 -i
|
||||
# use xargs to take each path we've found
|
||||
# and pass it as an argument to clang-format
|
||||
|
||||
find soh -type f \( -name "*.c" -o -name "*.cpp" -o \( -name "*.h" ! -path "soh/src/**.h" ! -path "soh/include/**.h" \) \) ! -path "soh/assets/*" | sed 's| |\\ |g' | xargs clang-format-14 -i
|
||||
find soh -type f \( -name "*.c" -o -name "*.cpp" -o \( -name "*.h" ! -path "soh/src/**.h" ! -path "soh/include/**.h" \) \) ! -path "soh/assets/*" -print0 | xargs -0 clang-format-14 -i
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue