Skip to content

Commit

Permalink
optimized
Browse files Browse the repository at this point in the history
  • Loading branch information
leleliu008 committed Sep 12, 2024
1 parent 436024a commit fd7c2f2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ndk-pkg
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,11 @@ wfetch() {
fi

if [ -n "$SSL_CERT_FILE" ] ; then
CURL_OPTIONS="--cacert $SSL_CERT_FILE"
CURL_OPTIONS="$CURL_OPTIONS --cacert $SSL_CERT_FILE"
fi

if [ -n "$CURL_DNS_SERVERS" ] ; then
CURL_OPTIONS="$CURL_OPTIONS --dns-servers $CURL_DNS_SERVERS"
fi

run "curl $CURL_OPTIONS --fail --retry 20 --retry-delay 30 --location -o '$FETCH_BUFFER_FILEPATH' '$FETCH_URL'" ||
Expand Down Expand Up @@ -9197,16 +9201,20 @@ if [ -n "$NDKPKG_URL_TRANSFORM" ] ; then
export UPPM_URL_TRANSFORM="$NDKPKG_URL_TRANSFORM"
fi

unset CURL_DNS_SERVERS

if [ "$(uname -o 2>/dev/null || true)" = Android ] ; then
LV="$(getprop ro.build.version.sdk)"
export UPPM_FORMULA_REPO_URL_OFFICIAL_CORE="https://github.com/fpliu1214/uppm-package-repository-android-$LV-aarch64"

export CURLOPT_DNS_SERVERS='1.1.1.1,8.8.8.8'

unset TERMUX
CURL_DNS_SERVERS='1.1.1.1,8.8.8.8'

if command -v termux-info > /dev/null ; then
TERMUX=1
else
unset TERMUX
fi
fi

Expand Down

0 comments on commit fd7c2f2

Please sign in to comment.