From 8755b82355e57d123624648957b3d7612de1fc4c Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Fri, 30 Apr 2021 20:54:28 +0200 Subject: [PATCH] apply-clang-format.sh: Support formatting only selected files --- expat/apply-clang-format.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/expat/apply-clang-format.sh b/expat/apply-clang-format.sh index f667d60f..6d562a26 100755 --- a/expat/apply-clang-format.sh +++ b/expat/apply-clang-format.sh @@ -40,6 +40,10 @@ clang_format_args=( -verbose ) +if [[ $# -ge 1 ]]; then + exec clang-format "${clang_format_args[@]}" "$@" +fi + expand --tabs=2 --initial lib/siphash.h | sponge lib/siphash.h find \