~apt-fast/apt-fast/apt-fast-ro

« back to all changes in this revision

Viewing changes to apt-fast

  • Committer: GitHub
  • Author(s): guekho64
  • Date: 2020-12-28 13:11:48 UTC
  • Revision ID: git-v1:5f853c97ddc3704898b47e2e5af9714d68e2ff69
Remove *.aria2 files, add documentation

 * Reimplement #184 while fixing #185
 * Added some description/documentation too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
577
577
 
578
578
        eval "${_DOWNLOADER}"  # execute downloadhelper command
579
579
        if [ "$(find "$DLDIR" -printf . | wc -c)" -gt 1 ]; then
580
 
          # Delete failed downloads
581
 
          for f in *.aria2; do
582
 
            [[ "$f" -ne "*.aria2" ]] && rm "${f%.*}" "$f"
 
580
 
 
581
          # Delete incomplete/corrupted downloaded files, if any: Not recursive, as we don't expect any dirs to exist within $DLDIR.
 
582
 
 
583
          # When Aria2c downloads a file and detects it is corrupted, its filename won't be renamed back to its actual name,
 
584
          # preserving .aria2 file extension, which also indicates when a file hasn't been completely downloaded.
 
585
          for x in *.aria2; do
 
586
            rm -f "$x" "${x%.aria2}"
583
587
          done
 
588
 
584
589
          # Move all packages to the apt install directory by force to ensure
585
590
          # already existing debs which may be incomplete are replaced
586
591
          find . -type f \( -name '*.deb' -o -name '*.ddeb' \) -execdir mv -ft "$APTCACHE" {} \+