From 4c337bbdde5d2fdef8a9dc4a2d9727537b699eb4 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Tue, 4 Feb 2025 08:38:24 +0000
Subject: [PATCH] Using autogen.sh allow fallback to curl if wget is missing
 for build

---
 dnn/download_model.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/dnn/download_model.sh b/dnn/download_model.sh
index 75108e33f..bc88f150d 100755
--- a/dnn/download_model.sh
+++ b/dnn/download_model.sh
@@ -5,7 +5,12 @@ model=opus_data-$1.tar.gz
 
 if [ ! -f $model ]; then
         echo "Downloading latest model"
-        wget https://media.xiph.org/opus/models/$model
+        if command -v wget >/dev/null; then
+          wget -O $model https://media.xiph.org/opus/models/$model
+        else
+          # if wget is not available use curl
+          curl -o $model https://media.xiph.org/opus/models/$model
+        fi
 fi
 
 if command -v sha256sum