From 03cd64b292441671179e446390a7602b37748eb1 Mon Sep 17 00:00:00 2001 From: timoxa0 Date: Sat, 2 Nov 2024 22:37:53 +0500 Subject: [PATCH] functions: Add clean raw images messages --- common.d/functions.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common.d/functions.sh b/common.d/functions.sh index 166d4b2..89a1d30 100644 --- a/common.d/functions.sh +++ b/common.d/functions.sh @@ -135,7 +135,11 @@ cleanup() cleanraw() { - rm ./raw/* -f + find ./raw/ -mindepth 1 -maxdepth 1 | read || { + [ -z ${quiet+x} ] && log "Nothing to clean" error + return 0 + } + rm ./raw/* -f && log "Done!" } # shellcheck disable=SC2317