Avoid find warning global options are not positional (-maxdepth after the argument -type)
continuous-integration/drone/push Build is passing Details

This commit is contained in:
William Hirigoyen (Evolix) 2022-07-20 11:02:44 +02:00
parent d67e03e5a2
commit fa5eb5aa5c
1 changed files with 1 additions and 1 deletions

View File

@ -742,7 +742,7 @@ check_backupuptodate() {
backup_dir="/home/backup"
if [ -d "${backup_dir}" ]; then
if [ -n "$(ls -A ${backup_dir})" ]; then
find "${backup_dir}" -type f -maxdepth 1 | while read -r file; do
find "${backup_dir}" -maxdepth 1 -type f | while read -r file; do
limit=$(date +"%s" -d "now - 2 day")
updated_at=$(stat -c "%Y" "$file")