Remove backup file if indent was successful.

This commit is contained in:
Jordan Bancino 2022-07-25 22:54:56 -04:00
parent ace2682dec
commit d9d1713f54

View file

@ -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
}