Skip to content

Commit edea8a9

Browse files
authored
whisper : prefer curl over wget in download scripts (#3409)
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.
1 parent bb0e1fc commit edea8a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

models/download-ggml-model.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,12 @@ fi
119119

120120
if [ -x "$(command -v wget2)" ]; then
121121
wget2 --no-config --progress bar -O ggml-"$model".bin $src/$pfx-"$model".bin
122-
elif [ -x "$(command -v wget)" ]; then
123-
wget --no-config --quiet --show-progress -O ggml-"$model".bin $src/$pfx-"$model".bin
124122
elif [ -x "$(command -v curl)" ]; then
125123
curl -L --output ggml-"$model".bin $src/$pfx-"$model".bin
124+
elif [ -x "$(command -v wget)" ]; then
125+
wget --no-config --quiet --show-progress -O ggml-"$model".bin $src/$pfx-"$model".bin
126126
else
127-
printf "Either wget or curl is required to download models.\n"
127+
printf "Either wget2, curl, or wget is required to download models.\n"
128128
exit 1
129129
fi
130130

0 commit comments

Comments
 (0)