diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-05-25 01:08:20 -0600 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-05-25 01:08:20 -0600 |
commit | 148bfaf36c04106e4ff1043dff2c5f6c3d75149e (patch) | |
tree | 1f7067afc23b8fea8f233e30d3f561f51ab7927e /cron-jobs/ftpdir-cleanup | |
parent | de330518db13ca0a6bb9d0a4227f842d2a8ca941 (diff) |
Handle empty things (from Arch Linux)
Diffstat (limited to 'cron-jobs/ftpdir-cleanup')
-rwxr-xr-x | cron-jobs/ftpdir-cleanup | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup index 560689a..4063c09 100755 --- a/cron-jobs/ftpdir-cleanup +++ b/cron-jobs/ftpdir-cleanup @@ -64,7 +64,7 @@ done # get a list of all available packages in the pacakge pool find "$FTP_BASE/${PKGPOOL}" -name "*${PKGEXT}" -printf '%f\n' | sort > "${WORKDIR}/pool" # create a list of packages in our db -cat "${WORKDIR}/db-"* | sort -u > "${WORKDIR}/db" +find "${WORKDIR}" -maxdepth 1 -type f -name 'db-*' -exec cat {} \; | sort -u > "${WORKDIR}/db" old_pkgs=($(comm -23 "${WORKDIR}/pool" "${WORKDIR}/db")) if [ ${#old_pkgs[@]} -ge 1 ]; then |