mirror of
https://github.com/coolsnowwolf/packages.git
synced 2025-05-02 11:40:25 +08:00
缓存结果,节省io
每次都要find /lib,挺占cpu时间的
This commit is contained in:
parent
422768a6b8
commit
1d49b6e020
@ -80,7 +80,12 @@ WGET_SSL=$(which wget-ssl)
|
|||||||
CURL=$(which curl)
|
CURL=$(which curl)
|
||||||
|
|
||||||
# CURL_PROXY not empty then Proxy support available
|
# CURL_PROXY not empty then Proxy support available
|
||||||
|
if [ -f /tmp/vCURL_PROXY ]; then
|
||||||
|
CURL_PROXY=$(cat /tmp/vCURL_PROXY);
|
||||||
|
else
|
||||||
CURL_PROXY=$(find /lib /usr/lib -name libcurl.so* -exec strings {} 2>/dev/null \; | grep -im1 "all_proxy")
|
CURL_PROXY=$(find /lib /usr/lib -name libcurl.so* -exec strings {} 2>/dev/null \; | grep -im1 "all_proxy")
|
||||||
|
echo $CURL_PROXY>/tmp/vCURL_PROXY
|
||||||
|
fi
|
||||||
|
|
||||||
UCLIENT_FETCH=$(which uclient-fetch)
|
UCLIENT_FETCH=$(which uclient-fetch)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user