Skip to content

Instantly share code, notes, and snippets.

@WalternativE
Last active August 22, 2017 11:04
Show Gist options
  • Save WalternativE/b2dded9db662025aa580bb9d23eeecc3 to your computer and use it in GitHub Desktop.
Save WalternativE/b2dded9db662025aa580bb9d23eeecc3 to your computer and use it in GitHub Desktop.
download paket bootstrapper binary
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