mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
4e2dba4d9f
Restyled astyle is fixed now.
25 lines
782 B
Bash
Executable File
25 lines
782 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
FIND="find ."
|
|
FIND="$FIND '(' -name '*.[ch]' ')'"
|
|
FIND="$FIND -and -not -name '*.api.h'"
|
|
FIND="$FIND -and -not -wholename './super_donators/*'"
|
|
FIND="$FIND -and -not -wholename './third_party/*'"
|
|
FIND="$FIND -and -not -wholename './toxencryptsave/crypto_pwhash*'"
|
|
|
|
readarray -t C_SOURCES <<<"$(eval "$FIND")"
|
|
readarray -t CC_SOURCES <<<"$(find . '(' -name '*.cc' -or -name '*.hh' ')')"
|
|
#CC_SOURCES+=(toxcore/crypto_core.c)
|
|
#CC_SOURCES+=(toxcore/ping_array.c)
|
|
|
|
# Format C++ sources with clang-format.
|
|
clang-format -i "${CC_SOURCES[@]}"
|
|
|
|
# Format C sources with astyle. We can't use clang-format, because it strongly
|
|
# messes up formatting of non_null annotations.
|
|
astyle -n --options=other/astyle/astylerc "${C_SOURCES[@]}"
|
|
|
|
git diff --color=always --exit-code
|