Compare commits

...

3 Commits

3 changed files with 21 additions and 20 deletions
Binary file not shown.
Binary file not shown.
+2 -7
View File
@@ -57,18 +57,14 @@ try {
`$urls = $urlLiteral
`$headers = @{ 'User-Agent' = 'Mozilla/5.0' }
if (Test-Path `$jarPath) {
Write-Host "SheepIt client already present at `$jarPath. Skipping download." -ForegroundColor Green
}
else {
# Always fetch client-latest; cached jars go stale when the farm bumps minimum client version.
`$downloaded = `$false
foreach (`$url in `$urls) {
Write-Host "Downloading SheepIt client from `$url..." -ForegroundColor Cyan
try {
Invoke-WebRequest -Uri `$url -OutFile `$jarPath -UseBasicParsing -Headers `$headers
`$downloaded = `$true
Write-Host "Download complete." -ForegroundColor Green
Write-Host "Download complete -> `$jarPath" -ForegroundColor Green
break
}
catch {
@@ -79,7 +75,6 @@ try {
if (-not `$downloaded) {
throw 'Unable to download SheepIt client from any known URL.'
}
}
Write-Host "Starting SheepIt client..." -ForegroundColor Cyan