Last active
October 4, 2024 21:38
-
-
Save AfroThundr3007730/d9ae9c467c730669413f37184cf69906 to your computer and use it in GitHub Desktop.
cURL wrapper to auto resume downloads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Invoke-AutoCurl { | |
<# .SYNOPSIS | |
cURL wrapper to auto resume downloads #> | |
[Alias('autocurl')] | |
Param( | |
[Parameter(Mandatory)] | |
[Uri]$URL | |
) | |
do { | |
curl -LOC - $URL | |
} while ($LASTEXITCODE -in 18, 56) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment