From 3b253f6b601e84664be6f532a4871687473cea43 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Wed, 8 Apr 2026 23:57:09 +0000 Subject: [PATCH] feat: Support curl and fetch utilities for downloading distfiles\n\nFallback to curl and fetch when downloading dependencies in build-deps.sh if wget is unavailable. This improves the robustness and portability of the fetching system. Co-authored-by: segin <480709+segin@users.noreply.github.com> --- util/build-deps.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) mode change 100644 => 100755 util/build-deps.sh diff --git a/util/build-deps.sh b/util/build-deps.sh old mode 100644 new mode 100755 index 70217828..d4526aa1 --- a/util/build-deps.sh +++ b/util/build-deps.sh @@ -171,7 +171,16 @@ distfiles_fetch () { # If the file exists but didn't pass check, or doesn't exist, we download it using -c (continue) notice "Fetching for ${package}-${DISTVERS[$package]}" - wget -c -O ${distfile} ${DISTS[$package]} + if command -v curl >/dev/null 2>&1; then + curl -f -L -C - -o ${distfile} ${DISTS[$package]} + elif command -v wget >/dev/null 2>&1; then + wget -c -O ${distfile} ${DISTS[$package]} + elif command -v fetch >/dev/null 2>&1; then + fetch -o ${distfile} ${DISTS[$package]} + else + notice "No suitable download tool (curl, wget, or fetch) found! Bailing!" + exit 1 + fi if distfiles_sum MD5 ${package} && distfiles_sum SHA256 ${package}; then return 0