From e441e79e287a538988c14b534baac4cca3ce7599 Mon Sep 17 00:00:00 2001 From: merakor Date: Mon, 14 Nov 2022 20:13:38 +0000 Subject: pkg_download(): fix aria2c usage FossilOrigin-Name: 197251c64e533e54abcb4e5e7e448f1765b08439c28594c2361ce9884049d562 --- src/cpt-lib.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cpt-lib.in b/src/cpt-lib.in index 255a9e8..37c0860 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -512,11 +512,12 @@ regesc() { pkg_download() { # $1: URL # $2: Output (Optional) - set -- "$1" "${2:-${1##*/}}" + set -- "$1" "$(_readlinkf "${2:-${1##*/}}")" case ${dl_prog##*/} in - aria2c|axel) set -- -o "$2" "$1" ;; - curl) set -- -fLo "$2" "$1" ;; - wget|wget2) set -- -O "$2" "$1" ;; + axel) set -- -o "$2" "$1" ;; + aria2c) set -- -d "${2%/*}" -o "${2##*/}" "$1" ;; + curl) set -- -fLo "$2" "$1" ;; + wget|wget2) set -- -O "$2" "$1" ;; esac "$dl_prog" "$@" || { -- cgit v1.2.3