fix cleanup-directory function
This commit is contained in:
parent
ee2ad8f08b
commit
b50a1bcae2
@ -11,7 +11,7 @@ if [ ! -d "${directory}" ]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -n "${DRYRUN}" ]; then
|
||||
if [ -n "${DRYRUN:-}" ]; then
|
||||
echo "Deleting files not accessed for a ${age} days:"
|
||||
find "${directory}" -mindepth 1 -atime "${age}" -not -type d -not -name cleanup.log
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ fi
|
||||
|
||||
readonly log_file="${directory}/cleanup.log"
|
||||
|
||||
if [ -n "${DRYRUN}" ]; then
|
||||
if [ -n "${DRYRUN:-}" ]; then
|
||||
log_file="/dev/null"
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user