Skip to content

Commit

Permalink
fix: openssl new download url
Browse files Browse the repository at this point in the history
  • Loading branch information
abcfy2 committed Jul 27, 2024
1 parent 4868af0 commit 59dd8fe
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ prepare_cmake() {
cmake_binary_url="https://github.com/Kitware/CMake/releases/download/v${cmake_latest_ver}/cmake-${cmake_latest_ver}-linux-x86_64.tar.gz"
cmake_sha256_url="https://github.com/Kitware/CMake/releases/download/v${cmake_latest_ver}/cmake-${cmake_latest_ver}-SHA-256.txt"
if [ x"${USE_CHINA_MIRROR}" = x1 ]; then
cmake_binary_url="https://mirror.ghproxy.com/${cmake_binary_url}"
cmake_sha256_url="https://mirror.ghproxy.com/${cmake_sha256_url}"
cmake_binary_url="https://ghproxy.org/${cmake_binary_url}"
cmake_sha256_url="https://ghproxy.org/${cmake_sha256_url}"
fi
if [ -f "${DOWNLOADS_DIR}/cmake-${cmake_latest_ver}-linux-x86_64.tar.gz" ]; then
cd "${DOWNLOADS_DIR}"
Expand All @@ -181,7 +181,7 @@ prepare_ninja() {
ninja_ver="$(retry wget -qO- --compression=auto https://ninja-build.org/ \| grep "'The last Ninja release is'" \| sed -r "'s@.*<b>(.+)</b>.*@\1@'" \| head -1)"
ninja_binary_url="https://github.com/ninja-build/ninja/releases/download/${ninja_ver}/ninja-linux.zip"
if [ x"${USE_CHINA_MIRROR}" = x1 ]; then
ninja_binary_url="https://mirror.ghproxy.com/${ninja_binary_url}"
ninja_binary_url="https://ghproxy.org/${ninja_binary_url}"
fi
if [ ! -f "${DOWNLOADS_DIR}/ninja-${ninja_ver}-linux.zip" ]; then
rm -f "${DOWNLOADS_DIR}/ninja-${ninja_ver}-linux.zip.part"
Expand All @@ -198,7 +198,7 @@ prepare_zlib() {
zlib_ng_latest_tag="$(retry wget -qO- --compression=auto https://api.github.com/repos/zlib-ng/zlib-ng/releases \| jq -r "'.[0].tag_name'")"
zlib_ng_latest_url="https://github.com/zlib-ng/zlib-ng/archive/refs/tags/${zlib_ng_latest_tag}.tar.gz"
if [ x"${USE_CHINA_MIRROR}" = x1 ]; then
zlib_ng_latest_url="https://mirror.ghproxy.com/${zlib_ng_latest_url}"
zlib_ng_latest_url="https://ghproxy.org/${zlib_ng_latest_url}"
fi
if [ ! -f "${DOWNLOADS_DIR}/zlib-ng-${zlib_ng_latest_tag}.tar.gz" ]; then
retry wget -cT10 -O "${DOWNLOADS_DIR}/zlib-ng-${zlib_ng_latest_tag}.tar.gz.part" "${zlib_ng_latest_url}"
Expand Down Expand Up @@ -253,7 +253,7 @@ prepare_xz() {
# xz_archive_name="$(printf '%s' "${xz_release_info}" | jq -r '.assets[].name | select(endswith("tar.xz"))')"
# xz_latest_url="https://github.com/tukaani-project/xz/releases/download/${xz_tag}/${xz_archive_name}"
# if [ x"${USE_CHINA_MIRROR}" = x1 ]; then
# xz_latest_url="https://mirror.ghproxy.com/${xz_latest_url}"
# xz_latest_url="https://ghproxy.org/${xz_latest_url}"
# fi
# Download from sourceforge
xz_tag="$(retry wget -qO- --compression=auto https://sourceforge.net/projects/lzmautils/files/ \| grep -i \'span class=\"sub-label\"\' \| head -1 \| sed -r "'s/.*xz-(.+)\.tar\.gz.*/\1/'")"
Expand Down Expand Up @@ -298,11 +298,11 @@ prepare_ssl() {
echo "- libressl: ${libressl_ver}, source: ${libressl_latest_url:-cached libressl}" >>"${BUILD_INFO}"
else
# openssl
openssl_filename="$(retry wget -qO- --compression=auto https://www.openssl.org/source/ \| grep -o "'href=\"openssl-3.*tar.gz\"'" \| grep -o "'[^\"]*.tar.gz'" \| sort -nr \| head -1)"
openssl_filename="$(retry wget -qO- --compression=auto https://openssl-library.org/source/ \| grep -o "'>openssl-3.*tar.gz<'" \| grep -o "'[^>]*.tar.gz'" \| sort -nr \| head -1)"
openssl_ver="$(echo "${openssl_filename}" | sed -r 's/openssl-(.+)\.tar\.gz/\1/')"
openssl_latest_url="https://github.com/openssl/openssl/archive/refs/tags/${openssl_filename}"
openssl_latest_url="https://github.com/openssl/openssl/releases/download/openssl-${openssl_ver}/${openssl_filename}"
if [ x"${USE_CHINA_MIRROR}" = x1 ]; then
openssl_latest_url="https://mirror.ghproxy.com/${openssl_latest_url}"
openssl_latest_url="https://ghproxy.org/${openssl_latest_url}"
fi
if [ ! -f "${DOWNLOADS_DIR}/openssl-${openssl_ver}.tar.gz" ]; then
retry wget -cT10 -O "${DOWNLOADS_DIR}/openssl-${openssl_ver}.tar.gz.part" "${openssl_latest_url}"
Expand Down Expand Up @@ -342,7 +342,7 @@ prepare_sqlite() {
sqlite_tag="$(retry wget -qO- --compression=auto https://www.sqlite.org/index.html \| sed -nr "'s/.*>Version (.+)<.*/\1/p'")"
sqlite_latest_url="https://github.com/sqlite/sqlite/archive/release.tar.gz"
if [ x"${USE_CHINA_MIRROR}" = x1 ]; then
sqlite_latest_url="https://mirror.ghproxy.com/${sqlite_latest_url}"
sqlite_latest_url="https://ghproxy.org/${sqlite_latest_url}"
fi
if [ ! -f "${DOWNLOADS_DIR}/sqlite-${sqlite_tag}.tar.gz" ]; then
retry wget -cT10 -O "${DOWNLOADS_DIR}/sqlite-${sqlite_tag}.tar.gz.part" "${sqlite_latest_url}"
Expand All @@ -367,7 +367,7 @@ prepare_c_ares() {
cares_ver="${cares_latest_tag#v}"
cares_latest_url="https://github.com/c-ares/c-ares/releases/download/${cares_latest_tag}/c-ares-${cares_ver}.tar.gz"
if [ x"${USE_CHINA_MIRROR}" = x1 ]; then
cares_latest_url="https://mirror.ghproxy.com/${cares_latest_url}"
cares_latest_url="https://ghproxy.org/${cares_latest_url}"
fi
if [ ! -f "${DOWNLOADS_DIR}/c-ares-${cares_ver}.tar.gz" ]; then
retry wget -cT10 -O "${DOWNLOADS_DIR}/c-ares-${cares_ver}.tar.gz.part" "${cares_latest_url}"
Expand Down Expand Up @@ -426,7 +426,7 @@ build_aria2() {
aria2_latest_url="https://github.com/aria2/aria2/archive/master.tar.gz"
fi
if [ x"${USE_CHINA_MIRROR}" = x1 ]; then
aria2_latest_url="https://mirror.ghproxy.com/${aria2_latest_url}"
aria2_latest_url="https://ghproxy.org/${aria2_latest_url}"
fi

if [ ! -f "${DOWNLOADS_DIR}/aria2-${aria2_tag}.tar.gz" ]; then
Expand Down

0 comments on commit 59dd8fe

Please sign in to comment.