summaryrefslogtreecommitdiff
path: root/cron-jobs/ftpdir-cleanup
diff options
context:
space:
mode:
Diffstat (limited to 'cron-jobs/ftpdir-cleanup')
-rwxr-xr-xcron-jobs/ftpdir-cleanup14
1 files changed, 7 insertions, 7 deletions
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index 452aa83..2b32eae 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -30,11 +30,11 @@ for repo in "${PKGREPOS[@]}"; do
continue
fi
# get a list of actual available package files
- find "${root_dir}/${repo}/os/${arch}" -xtype f -name "*${package_extension_suffixfile}" -printf '%f\n' | sort > "${WORKDIR}/repo-${repo}-${arch}"
+ find "${root_dir}/${repo}/os/${arch}" -xtype f -name "*${package_extension_suffixfile}" -printf '%f\n' | sort > "${work_directory}/repo-${repo}-${arch}"
# get a list of package files defined in the repo db
- bsdtar -xOf "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile}" | awk '/^%FILENAME%/{getline;print}' | sort > "${WORKDIR}/db-${repo}-${arch}"
+ bsdtar -xOf "${root_dir}/${repo}/os/${arch}/${repo}${database_extension_suffixfile}" | awk '/^%FILENAME%/{getline;print}' | sort > "${work_directory}/db-${repo}-${arch}"
- missing_pkgs=($(comm -13 "${WORKDIR}/repo-${repo}-${arch}" "${WORKDIR}/db-${repo}-${arch}"))
+ missing_pkgs=($(comm -13 "${work_directory}/repo-${repo}-${arch}" "${work_directory}/db-${repo}-${arch}"))
if [ ${#missing_pkgs[@]} -ge 1 ]; then
error "Missing packages in [%s] (%s)..." "${repo}" "${arch}"
for missing_pkg in "${missing_pkgs[@]}"; do
@@ -42,7 +42,7 @@ for repo in "${PKGREPOS[@]}"; do
done
fi
- old_pkgs=($(comm -23 "${WORKDIR}/repo-${repo}-${arch}" "${WORKDIR}/db-${repo}-${arch}"))
+ old_pkgs=($(comm -23 "${work_directory}/repo-${repo}-${arch}" "${work_directory}/db-${repo}-${arch}"))
if [ ${#old_pkgs[@]} -ge 1 ]; then
msg "Removing old packages from [%s] (%s)..." "${repo}" "${arch}"
for old_pkg in "${old_pkgs[@]}"; do
@@ -54,11 +54,11 @@ for repo in "${PKGREPOS[@]}"; do
done
# get a list of all available packages in the pacakge pool
-find "${root_dir}/${PKGPOOL}" -name "*${package_extension_suffixfile}" -printf '%f\n' | sort > "${WORKDIR}/pool"
+find "${root_dir}/${PKGPOOL}" -name "*${package_extension_suffixfile}" -printf '%f\n' | sort > "${work_directory}/pool"
# create a list of packages in our db
-cat "${WORKDIR}/db-"* | sort -u > "${WORKDIR}/db"
+cat "${work_directory}/db-"* | sort -u > "${work_directory}/db"
-old_pkgs=($(comm -23 "${WORKDIR}/pool" "${WORKDIR}/db"))
+old_pkgs=($(comm -23 "${work_directory}/pool" "${work_directory}/db"))
if [ ${#old_pkgs[@]} -ge 1 ]; then
msg "Removing old packages from package pool..."
for old_pkg in "${old_pkgs[@]}"; do