缓存结果,节省io

每次都要find /lib,挺占cpu时间的
This commit is contained in:
klever1988 2020-03-18 19:04:49 +08:00 committed by GitHub
parent 422768a6b8
commit 1d49b6e020
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,12 @@ WGET_SSL=$(which wget-ssl)
CURL=$(which curl)
# 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")
echo $CURL_PROXY>/tmp/vCURL_PROXY
fi
UCLIENT_FETCH=$(which uclient-fetch)