]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
whisper : prefer curl over wget in download scripts (#3409)
authorSiva Mahadevan <redacted>
Mon, 8 Sep 2025 04:32:19 +0000 (00:32 -0400)
committerGitHub <redacted>
Mon, 8 Sep 2025 04:32:19 +0000 (06:32 +0200)
On busybox-based systems like Alpine Linux, wget does not have
certain CLI flags such as '--no-config'. Thus, search for the
existence of 'curl' first in the PATH before wget. wget2 is
still the preferred download tool.

models/download-ggml-model.sh

index ef9c90dab67d32bda82791b674ff924ddfa62776..f1394e98484f0a122393eb5713ba4798434d1b9e 100755 (executable)
@@ -119,12 +119,12 @@ fi
 
 if [ -x "$(command -v wget2)" ]; then
     wget2 --no-config --progress bar -O ggml-"$model".bin $src/$pfx-"$model".bin
-elif [ -x "$(command -v wget)" ]; then
-    wget --no-config --quiet --show-progress -O ggml-"$model".bin $src/$pfx-"$model".bin
 elif [ -x "$(command -v curl)" ]; then
     curl -L --output ggml-"$model".bin $src/$pfx-"$model".bin
+elif [ -x "$(command -v wget)" ]; then
+    wget --no-config --quiet --show-progress -O ggml-"$model".bin $src/$pfx-"$model".bin
 else
-    printf "Either wget or curl is required to download models.\n"
+    printf "Either wget2, curl, or wget is required to download models.\n"
     exit 1
 fi