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/*"
|
# ! -path "soh/assets/*"
|
||||||
# asset headers are autogenerated, don't fight them
|
# asset headers are autogenerated, don't fight them
|
||||||
#
|
#
|
||||||
# | sed 's| |\\ |g'
|
# -print0
|
||||||
# pipe the result of find into sed to
|
# separate paths with NUL bytes, avoiding issues with spaces in paths
|
||||||
# ensure all the paths returned by find have spaces escaped
|
|
||||||
#
|
#
|
||||||
# | xargs clang-format-14 -i
|
# | xargs -0 clang-format-14 -i
|
||||||
# use xargs to take each path we've found
|
# use xargs to take each path we've found
|
||||||
# and pass it as an argument to clang-format
|
# 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