diff options
author | Peter Elliott <pelliott@ualberta.ca> | 2021-04-11 12:07:32 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-12 14:06:24 +0200 |
commit | fbbb4b33955ec089dc8b26df76f59e25ba49d37d (patch) | |
tree | 4f7f9421045ae59e6a3937df6810555d170a5d0d /Ports | |
parent | f71102a4742fe81de42d62ef8ffb4aa8a04e6b81 (diff) | |
download | serenity-fbbb4b33955ec089dc8b26df76f59e25ba49d37d.zip |
Ports: fallback to pro when curl is not installed
Diffstat (limited to 'Ports')
-rwxr-xr-x | Ports/.port_include.sh | 8 |
1 files 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 |