Last active
August 22, 2017 11:04
-
-
Save WalternativE/b2dded9db662025aa580bb9d23eeecc3 to your computer and use it in GitHub Desktop.
download paket bootstrapper binary
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
param ( | |
[string] | |
$OutputDir | |
) | |
function DownloadBootstrapper { | |
param( | |
[string] | |
$OutputPath | |
) | |
if ([System.String]::IsNullOrWhiteSpace($OutputPath)) { | |
Write-Host "Output Path is not set - I assume you have a local .paket directory here" | |
$OutputPath = ".paket" | |
if (!(Test-Path $OutputPath)) { | |
New-Item -ItemType Directory -Path $OutputPath | |
} | |
} else { | |
if (!(Test-Path $OutputPath)) { | |
Write-Host "The given path does not exist" | |
Exit 1 | |
} | |
} | |
$version = "5.89.1" | |
$uri = "https://github.com/fsprojects/Paket/releases/download/${version}/paket.bootstrapper.exe" | |
$filePath = "${OutputPath}\paket.bootstrapper.exe" | |
Write-Host "Downloading " $uri " to " $filePath | |
Invoke-WebRequest -Uri $uri -OutFile $filePath | |
# we should also execute the bootstrapper | |
& $filePath | |
} | |
DownloadBootstrapper -OutputPath $OutputDir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment