url-lib/url-lib.sh: add proxy support for curl

master
Harald Hoyer 2013-02-11 13:56:04 +01:00
parent 918a6874df
commit 6ecb9a2d68
1 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,9 @@ mkdir -p $CURL_HOME
curl_args="--location --retry 3 --fail --show-error"
getargbool 0 rd.noverifyssl && curl_args="$curl_args --insecure"

proxy=$(getarg proxy=)
[ -n "$proxy" ] && curl_args+="$curl_args --proxy $proxy"

curl_fetch_url() {
local url="$1" outloc="$2"
echo "$url" > /proc/self/fd/0