try download with sudo if it fails
This commit is contained in:
4
kfg
4
kfg
@@ -211,8 +211,8 @@ function download {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case "${_dld}" in
|
case "${_dld}" in
|
||||||
curl) _result="$(curl $_args "${_url}")" || err "curl: failed to download ${_url}" ;;
|
curl) _result="$(curl "$_args" "${_url}")" || "$(sudo curl "$_args" "${_url}")" || err "curl: failed to download ${_url}" ;;
|
||||||
wget) _result="$(wget $_args "${_url}")" || err "wget: failed to download ${_url}" ;;
|
wget) _result="$(wget "$_args" "${_url}")" || "$(sudo wget "$_args" "${_url}")" || err "wget: failed to download ${_url}" ;;
|
||||||
*) err "unsupported downloader: ${_dld}" ;;
|
*) err "unsupported downloader: ${_dld}" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user