diff options
author | merakor <cem@ckyln.com> | 2022-11-14 20:13:38 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2022-11-14 20:13:38 +0000 |
commit | e441e79e287a538988c14b534baac4cca3ce7599 (patch) | |
tree | 1ebc882367b6a54360297002e7c6733da824d980 | |
parent | a672ca6e340d85f8a347fdcd97d3c70b9e1abef5 (diff) | |
download | cpt-e441e79e287a538988c14b534baac4cca3ce7599.tar.gz |
pkg_download(): fix aria2c usage
FossilOrigin-Name: 197251c64e533e54abcb4e5e7e448f1765b08439c28594c2361ce9884049d562
-rw-r--r-- | src/cpt-lib.in | 9 |
1 files 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" "$@" || { |