From fbbb4b33955ec089dc8b26df76f59e25ba49d37d Mon Sep 17 00:00:00 2001 From: Peter Elliott Date: Sun, 11 Apr 2021 12:07:32 -0600 Subject: [PATCH] Ports: fallback to pro when curl is not installed --- Ports/.port_include.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index a1620d9eff..2e282d450e 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -70,7 +70,7 @@ fetch() { echo "URL: ${url}" # FIXME: Serenity's curl port does not support https, even with openssl installed. - if ! curl https://example.com -so /dev/null; then + if which curl && ! curl https://example.com -so /dev/null; then url=$(echo "$url" | sed "s/^https:\/\//http:\/\//") fi @@ -79,7 +79,11 @@ fetch() { if [ -f "$filename" ]; then echo "$filename already exists" else - run_nocd curl ${curlopts:-} "$url" -L -o "$filename" + if which curl; then + run_nocd curl ${curlopts:-} "$url" -L -o "$filename" + else + run_nocd pro "$url" > "$filename" + fi fi # check md5sum if given