Update downloader commands in zrep_global_downloader and zrep_download_package functions. Fixed ZSH_SCRIPT variable usage.
This commit is contained in:
parent
933b27b167
commit
d0136a9b19
12
zpi
12
zpi
@ -523,13 +523,13 @@ function zrep_check_if_installed() {
|
|||||||
function zrep_global_downloader() {
|
function zrep_global_downloader() {
|
||||||
case ${config[global_downloader]} in
|
case ${config[global_downloader]} in
|
||||||
curl)
|
curl)
|
||||||
dloader="curl -s -A \"${ZSH_SCRIPT} ${VERSION} (curl)\""
|
dloader="curl -s -A \"${ZSH_SCRIPT:t} ${VERSION} (curl)\""
|
||||||
;;
|
;;
|
||||||
wget)
|
wget)
|
||||||
dloader="wget -q -U \"${ZSH_SCRIPT} ${VERSION} (wget)\""
|
dloader="wget -q -U \"${ZSH_SCRIPT:t} ${VERSION} (wget)\""
|
||||||
;;
|
;;
|
||||||
wget2)
|
wget2)
|
||||||
dloader="wget2 -q -U \"${ZSH_SCRIPT} ${VERSION} (wget2)\""
|
dloader="wget2 -q -U \"${ZSH_SCRIPT:t} ${VERSION} (wget2)\""
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid Downloader."
|
echo "Invalid Downloader."
|
||||||
@ -653,15 +653,15 @@ function zrep_download_package() {
|
|||||||
case "${config[global_downloader]}" in
|
case "${config[global_downloader]}" in
|
||||||
curl)
|
curl)
|
||||||
downloader="curl"
|
downloader="curl"
|
||||||
cmd="curl -L -A \"${ZSH_SCRIPT} ${VERSION} (curl)\" -s -o \"$ZipFile\" \"$DownloadURL\" -w \"%{http_code}\""
|
cmd="curl -L -A \"${ZSH_SCRIPT:t} ${VERSION} (curl)\" -s -o \"$ZipFile\" \"$DownloadURL\" -w \"%{http_code}\""
|
||||||
;;
|
;;
|
||||||
wget)
|
wget)
|
||||||
downloader="wget"
|
downloader="wget"
|
||||||
cmd="wget -L -U \"${ZSH_SCRIPT} ${VERSION} (wget)\" -q -O \"$ZipFile\" \"$DownloadURL\""
|
cmd="wget -L -U \"${ZSH_SCRIPT:t} ${VERSION} (wget)\" -q -O \"$ZipFile\" \"$DownloadURL\""
|
||||||
;;
|
;;
|
||||||
wget2)
|
wget2)
|
||||||
downloader="wget2"
|
downloader="wget2"
|
||||||
cmd="wget2 -L -U \"${ZSH_SCRIPT} ${VERSION} (wget2)\" -q -O \"$ZipFile\" \"$DownloadURL\""
|
cmd="wget2 -L -U \"${ZSH_SCRIPT:t} ${VERSION} (wget2)\" -q -O \"$ZipFile\" \"$DownloadURL\""
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
zrep_msg debug "Unsupported or unspecified downloader: '${config[global_downloader]}'."
|
zrep_msg debug "Unsupported or unspecified downloader: '${config[global_downloader]}'."
|
||||||
|
Loading…
Reference in New Issue
Block a user