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