summaryrefslogtreecommitdiff
path: root/cron-jobs/ftpdir-cleanup
diff options
context:
space:
mode:
Diffstat (limited to 'cron-jobs/ftpdir-cleanup')
-rwxr-xr-xcron-jobs/ftpdir-cleanup18
1 files changed, 9 insertions, 9 deletions
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index ad2e7f9..292952b 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -7,7 +7,7 @@ clean_pkg() {
local pkg
local target
- if ! ${CLEANUP_DRYRUN}; then
+ if ! "${CLEANUP_DRYRUN}"; then
for pkg in "$@"; do
if [ -h "$pkg" ]; then
rm -f "$pkg" "$pkg.sig"
@@ -26,11 +26,11 @@ script_lock
for repo in "${PKGREPOS[@]}"; do
for arch in "${ARCHES[@]}"; do
- repo_lock ${repo} ${arch} || exit 1
+ repo_lock "${repo}" "${arch}" || exit 1
done
done
-${CLEANUP_DRYRUN} && warning 'dry run mode is active'
+"${CLEANUP_DRYRUN}" && warning 'dry run mode is active'
for repo in "${PKGREPOS[@]}"; do
for arch in "${ARCHES[@]}"; do
@@ -45,7 +45,7 @@ for repo in "${PKGREPOS[@]}"; do
missing_pkgs=($(comm -13 "${WORKDIR}/repo-${repo}-${arch}" "${WORKDIR}/db-${repo}-${arch}"))
if [ ${#missing_pkgs[@]} -ge 1 ]; then
error "Missing packages in [${repo}] (${arch})..."
- for missing_pkg in ${missing_pkgs[@]}; do
+ for missing_pkg in "${missing_pkgs[@]}"; do
msg2 "${missing_pkg}"
done
fi
@@ -69,18 +69,18 @@ cat "${WORKDIR}/db-"* | sort -u > "${WORKDIR}/db"
old_pkgs=($(comm -23 "${WORKDIR}/pool" "${WORKDIR}/db"))
if [ ${#old_pkgs[@]} -ge 1 ]; then
msg "Removing old packages from package pool..."
- for old_pkg in ${old_pkgs[@]}; do
+ for old_pkg in "${old_pkgs[@]}"; do
msg2 "${old_pkg}"
clean_pkg "$FTP_BASE/${PKGPOOL}/${old_pkg}"
done
fi
-old_pkgs=($(find ${CLEANUP_DESTDIR} -type f -name "*${PKGEXT}" -mtime +${CLEANUP_KEEP} -printf '%f\n'))
+old_pkgs=($(find "${CLEANUP_DESTDIR}" -type f -name "*${PKGEXT}" -mtime +"${CLEANUP_KEEP}" -printf '%f\n'))
if [ ${#old_pkgs[@]} -ge 1 ]; then
msg "Removing old packages from the cleanup directory..."
- for old_pkg in ${old_pkgs[@]}; do
+ for old_pkg in "${old_pkgs[@]}"; do
msg2 "${old_pkg}"
- if ! ${CLEANUP_DRYRUN}; then
+ if ! "${CLEANUP_DRYRUN}"; then
rm -f "${CLEANUP_DESTDIR}/${old_pkg}"
rm -f "${CLEANUP_DESTDIR}/${old_pkg}.sig"
fi
@@ -89,7 +89,7 @@ fi
for repo in "${PKGREPOS[@]}"; do
for arch in "${ARCHES[@]}"; do
- repo_unlock ${repo} ${arch}
+ repo_unlock "${repo}" "${arch}"
done
done