From d9d1713f5448a5243c7fdd1494beb7c33cedc963 Mon Sep 17 00:00:00 2001 From: Jordan Bancino Date: Mon, 25 Jul 2022 22:54:56 -0400 Subject: [PATCH] Remove backup file if indent was successful. --- make.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/make.sh b/make.sh index e4010b0..4182312 100644 --- a/make.sh +++ b/make.sh @@ -76,7 +76,9 @@ recipe_clean() { recipe_format() { find src -name '*.c' -or -name '*.h' | while IFS= read -r src; do echo "indent $src" - indent "$src" + if indent "$src"; then + rm $(basename "$src").BAK + fi done }