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 301da9e..9bb2586 100755 --- a/parabola-mirror-repos +++ b/parabola-mirror-repos @@ -74,7 +74,7 @@ else fi -REMOTE_POOL_FILES="/tmp/${project}-remote-files" +remote_pool_files="/tmp/${project}-remote-files" local_pool_files="/tmp/${project}-local-files" POOL_FILES_TO_DELETE="/tmp/${project}-to-delete-files" @@ -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}" @@ -290,7 +290,7 @@ if [[ ${db_and_symlinks_update} == 1 ]] ; then | grep -- "->" \ | grep "pool.*[^/]$" \ | sed -e "s#.*\(pool/.*/.*\)#\1#" \ - >> "$REMOTE_POOL_FILES" || error " => ERROR: Failed with error code: $?" + >> "$remote_pool_files" || error " => ERROR: Failed with error code: $?" if [[ ${first_run} == 0 ]] ; then echo "=> Getting local pool package file list" @@ -300,12 +300,12 @@ if [[ ${db_and_symlinks_update} == 1 ]] ; then echo "=> Building list of local pool package files to delete" # Avoid duplicates (comes from -any packages present in both i686/ and x86_64/) - sort -u -o "$REMOTE_POOL_FILES" "$REMOTE_POOL_FILES" + sort -u -o "$remote_pool_files" "$remote_pool_files" 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)" @@ -354,7 +354,7 @@ _wait_log_tmp if [[ ${pools_update} == 1 ]] ; then - rsync $OPTIONS --stats --exclude '*-mips64el.pkg.tar.*' --safe-links --files-from="$REMOTE_POOL_FILES" "${link_dest_option[@]}" --link-dest="$local_dir" $SERVER "${local_dir}".tmp + rsync $OPTIONS --stats --exclude '*-mips64el.pkg.tar.*' --safe-links --files-from="$remote_pool_files" "${link_dest_option[@]}" --link-dest="$local_dir" $SERVER "${local_dir}".tmp fi # end "if [[ ${pools_update} == 1 ]]" @@ -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}" |