Add kvminstall.ps1 to allow easier acquisition of KVM
This commit is contained in:
parent
9851adabc0
commit
646dae6d58
2
kvm.ps1
2
kvm.ps1
|
|
@ -21,7 +21,7 @@ $scriptPath = $myInvocation.MyCommand.Definition
|
||||||
|
|
||||||
function Kvm-Help {
|
function Kvm-Help {
|
||||||
@"
|
@"
|
||||||
K Runtime Environment Version Manager - Build {{BUILD_NUMBER}}
|
K Runtime Environment Version Manager - Build 482
|
||||||
|
|
||||||
USAGE: kvm <command> [options]
|
USAGE: kvm <command> [options]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
$tempPath = Join-Path $env:TEMP "kvminstall"
|
||||||
|
$kvmPs1Path = Join-Path $tempPath "kvm.ps1"
|
||||||
|
$kvmCmdPath = Join-Path $tempPath "kvm.cmd"
|
||||||
|
|
||||||
|
Write-Host "Using temporary directory: $tempPath";
|
||||||
|
if (![System.IO.Directory]::Exists($tempPath)) {[System.IO.Directory]::CreateDirectory($tempPath)}
|
||||||
|
|
||||||
|
|
||||||
|
$webClient = New-Object System.Net.WebClient
|
||||||
|
Write-Host "Downloading KVM.ps1 to $kvmPs1Path";
|
||||||
|
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/master/kvm.ps1', $kvmPs1Path);
|
||||||
|
Write-Host "Downloading KVM.cmd to $kvmCmdPath";
|
||||||
|
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/master/kvm.cmd', $kvmCmdPath);
|
||||||
|
Write-Host "Installing KVM";
|
||||||
|
& $kvmCmdPath setup;
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
@"%~dp0kvm.cmd" setup
|
|
||||||
pause
|
|
||||||
Loading…
Reference in New Issue