Skip to content

Commit

Permalink
Ports: fallback to pro when curl is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
petelliott authored and awesomekling committed Apr 12, 2021
1 parent f71102a commit fbbb4b3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Ports/.port_include.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit fbbb4b3

Please sign in to comment.