diff options
Diffstat (limited to 'parabola-mirror-repos')
-rwxr-xr-x | parabola-mirror-repos | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/parabola-mirror-repos b/parabola-mirror-repos index 310e396..27e4bc3 100755 --- a/parabola-mirror-repos +++ b/parabola-mirror-repos @@ -76,7 +76,7 @@ fi remote_pool_files="/tmp/${project}-remote-files" local_pool_files="/tmp/${project}-local-files" -POOL_FILES_TO_DELETE="/tmp/${project}-to-delete-files" +pool_files_to_delete="/tmp/${project}-to-delete-files" # Lock with flock (provided by util-linux), save to log file and send email on exit LOCKFILE="/var/lock/${script_filename}" @@ -280,7 +280,7 @@ cd "${local_dir}".tmp if [[ ${db_and_symlinks_update} == 1 ]] ; then # Delete temporary files that may be left over by a previous invocation of parabola-mirror-repos - rm -f "$remote_pool_files" "$local_pool_files" "$POOL_FILES_TO_DELETE" || true + rm -f "$remote_pool_files" "$local_pool_files" "$pool_files_to_delete" || true remote_repo_dirs="${repos_array[@]/#/${server}/}" remote_repo_dirs="${remote_repo_dirs[@]/%//os}" @@ -305,9 +305,9 @@ if [[ ${db_and_symlinks_update} == 1 ]] ; then sort -o "$local_pool_files" "$local_pool_files" # Keep lines that only appears in local_pool_files - comm -13 "$remote_pool_files" "$local_pool_files" > "$POOL_FILES_TO_DELETE" + comm -13 "$remote_pool_files" "$local_pool_files" > "$pool_files_to_delete" - NUMBER_TO_DELETE="$(wc -l $POOL_FILES_TO_DELETE | cut -d ' ' -f 1)" + NUMBER_TO_DELETE="$(wc -l $pool_files_to_delete | cut -d ' ' -f 1)" if [[ "$NUMBER_TO_DELETE" -gt "$max_delete" ]] ; then error " => ERROR: The number of pool package files to be deleted is ${NUMBER_TO_DELETE}, greater than the specified maximum which is ${max_delete}" @@ -316,10 +316,10 @@ if [[ ${db_and_symlinks_update} == 1 ]] ; then if [[ $NUMBER_TO_DELETE -gt 0 ]] ; then if [[ ${no_file_delete} == 1 ]] ; then echo "=> Deleting ${NUMBER_TO_DELETE} old pool package files" - find $(cat "$POOL_FILES_TO_DELETE") -print -exec rm -f {} \; + find $(cat "$pool_files_to_delete") -print -exec rm -f {} \; else echo "=> Deletion of pool package files (${NUMBER_TO_DELETE}) is disabled. List of files:" - printf '%s\n' $(cat "$POOL_FILES_TO_DELETE") + printf '%s\n' $(cat "$pool_files_to_delete") fi fi fi @@ -409,7 +409,7 @@ if [[ ${leave_tmp} == 0 ]] ; then fi fi -rm -f "$remote_pool_files" "$local_pool_files" "$POOL_FILES_TO_DELETE" "$local_dir".old || true +rm -f "$remote_pool_files" "$local_pool_files" "$pool_files_to_delete" "$local_dir".old || true echo "=> Disk space report" df -h "${base_dir}" |