From 74b64a27f8e07b1b0b47b809b1a060518fa11a97 Mon Sep 17 00:00:00 2001 From: Bryan Galdrikian Date: Fri, 3 May 2019 00:25:46 -0700 Subject: Blast SDK 1.1.5 prerelease #1 --- .../packman/win-bootstrap/fetch_file_from_url.ps1 | 37 ---------------------- 1 file changed, 37 deletions(-) delete mode 100755 buildtools/packman/win-bootstrap/fetch_file_from_url.ps1 (limited to 'buildtools/packman/win-bootstrap/fetch_file_from_url.ps1') diff --git a/buildtools/packman/win-bootstrap/fetch_file_from_url.ps1 b/buildtools/packman/win-bootstrap/fetch_file_from_url.ps1 deleted file mode 100755 index b9cb23c..0000000 --- a/buildtools/packman/win-bootstrap/fetch_file_from_url.ps1 +++ /dev/null @@ -1,37 +0,0 @@ -param( -[Parameter(Mandatory=$true)][string]$sourceUrl=$null, -[Parameter(Mandatory=$true)][string]$output=$null -) -$source = $sourceUrl -$filename = $output - -$req = [System.Net.httpwebrequest]::Create($source) -$req.cookiecontainer = New-Object System.net.CookieContainer - -Write-Host "Connecting to $source ..." -$res = $req.GetResponse() - -if($res.StatusCode -eq "OK") { - Write-Host "Downloading ..." - [int]$goal = $res.ContentLength - $reader = $res.GetResponseStream() - $writer = new-object System.IO.FileStream $fileName, "Create" - [byte[]]$buffer = new-object byte[] 4096 - [int]$total = [int]$count = 0 - do - { - $count = $reader.Read($buffer, 0, $buffer.Length); - $writer.Write($buffer, 0, $count); - $total += $count - if($goal -gt 0) { - Write-Progress "Downloading $url" "Saving $total of $goal" -id 0 -percentComplete (($total/$goal)*100) - } else { - Write-Progress "Downloading $url" "Saving $total bytes..." -id 0 - } - } while ($count -gt 0) - - $reader.Close() - $writer.Flush() - $writer.Close() -} - -- cgit v1.2.3