diff --git a/home/user/.local/bin/cleanup-directory b/home/user/.local/bin/cleanup-directory index eb63fe3..04bc184 100755 --- a/home/user/.local/bin/cleanup-directory +++ b/home/user/.local/bin/cleanup-directory @@ -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 diff --git a/home/user/.local/bin/cleanup-directory-log b/home/user/.local/bin/cleanup-directory-log index f5d74c5..c346cec 100755 --- a/home/user/.local/bin/cleanup-directory-log +++ b/home/user/.local/bin/cleanup-directory-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