Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions wcurl
Original file line number Diff line number Diff line change
Expand Up @@ -210,19 +210,21 @@ exec_curl()

CURL_NO_CLOBBER=""
CURL_PARALLEL=""
# --no-clobber is only supported since 7.83.0.
# --parallel is only supported since 7.66.0.
# --parallel-max-host is only supported since 8.16.0.

if [ "${curl_version_major}" -ge 8 ]; then
CURL_NO_CLOBBER="--no-clobber"
CURL_PARALLEL="--parallel"
if [ "${curl_version_minor}" -ge 16 ]; then
CURL_PARALLEL="--parallel --parallel-max-host 5"
CURL_PARALLEL="--parallel --parallel-max-host 5"

# --parallel-max-host is only supported since 8.16.0.
if [ "${curl_version_major}" -eq 8 ] && [ "${curl_version_minor}" -lt 16 ]; then
CURL_PARALLEL="--parallel"
fi
elif [ "${curl_version_major}" -eq 7 ]; then
# --no-clobber is only supported since 7.83.0.
if [ "${curl_version_minor}" -ge 83 ]; then
CURL_NO_CLOBBER="--no-clobber"
fi
# --parallel is only supported since 7.66.0.
if [ "${curl_version_minor}" -ge 66 ]; then
CURL_PARALLEL="--parallel"
fi
Expand Down