Check if directory is not empty (might be with downloads)
This commit is contained in:
parent
e052a7ddb6
commit
b6ec370cee
1 changed files with 3 additions and 1 deletions
|
@ -11,7 +11,9 @@ function version_gt() {
|
|||
|
||||
function cleanup() {
|
||||
local tmpdir=$1
|
||||
rm -r "${tmpdir:?}"/*
|
||||
if [ -n "$(ls -A ${tempdir})" ]; then
|
||||
rm -r "${tmpdir:?}"/*
|
||||
fi
|
||||
rmdir "${tmpdir}"
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue