mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:07:44 +00:00
Ports: fallback to pro when curl is not installed
This commit is contained in:
parent
f71102a474
commit
fbbb4b3395
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue