From 3bc640b65659c8219d6ec4aee33724a10b5e5839 Mon Sep 17 00:00:00 2001 From: Camden Dixie O'Brien Date: Thu, 24 Oct 2024 13:42:54 +0100 Subject: [PATCH] Skip .git directory in format and entr scripts --- scripts/entr.sh | 2 +- scripts/format.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/entr.sh b/scripts/entr.sh index 6f654c5..41bc8cb 100644 --- a/scripts/entr.sh +++ b/scripts/entr.sh @@ -1,3 +1,3 @@ cd "$(git rev-parse --show-toplevel)" -find . -not \( -path build -prune \) \ +find . -not \( -path './build' -prune \) -not \( -path './.git' -prune \) \ | entr -s 'clear && sh scripts/build.sh && sh scripts/test.sh' diff --git a/scripts/format.sh b/scripts/format.sh index 0e92e72..a6ce1a8 100644 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -1,3 +1,4 @@ cd "$(git rev-parse --show-toplevel)" -find . -not \( -path build -prune \) -name '*.c' -o -name '*.h' \ +find . -not \( -path './build' -prune \) -not \( -path './.git' -prune \) \ + -name '*.c' -o -name '*.h' \ | xargs -n 1 clang-format -i