Rename files.

This commit is contained in:
N. Taylor Mullen 2015-03-09 00:27:57 -07:00
parent d87e51887f
commit b84aafafdd
6 changed files with 1704 additions and 1697 deletions

View File

@ -1,6 +1,6 @@
@Echo off
@Echo off
set DNVM_CMD_PATH_FILE="%USERPROFILE%\\.dnx\\temp-set-envvars.cmd"
set DNVM_CMD_PATH_FILE="%USERPROFILE%\.dnx\temp-set-envvars.cmd"
PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';$CmdPathFile='%DNVM_CMD_PATH_FILE%';& '%~dp0dnvm.ps1' %*"

View File

@ -59,7 +59,7 @@ function _WriteOut {
### Constants
$ProductVersion="1.0.0"
$BuildVersion="beta4-10333"
$BuildVersion="beta4-10336"
$Authors="Microsoft Open Technologies, Inc."
# If the Version hasn't been replaced...
@ -72,27 +72,27 @@ if($BuildVersion.StartsWith("{{")) {
$FullVersion="$ProductVersion-$BuildVersion"
Set-Variable -Option Constant "CommandName" ([IO.Path]::GetFileNameWithoutExtension($ScriptPath))
Set-Variable -Option Constant "CommandFriendlyName" "K Runtime Version Manager"
Set-Variable -Option Constant "DefaultUserDirectoryName" ".k"
Set-Variable -Option Constant "OldUserDirectoryName" ".kre"
Set-Variable -Option Constant "RuntimePackageName" "kre"
Set-Variable -Option Constant "CommandFriendlyName" ".NET Version Manager"
Set-Variable -Option Constant "DefaultUserDirectoryName" ".dnx"
Set-Variable -Option Constant "OldUserDirectoryNames" @(".kre", ".k")
Set-Variable -Option Constant "RuntimePackageName" "dnx"
Set-Variable -Option Constant "DefaultFeed" "https://www.myget.org/F/aspnetvnext/api/v2"
Set-Variable -Option Constant "CrossGenCommand" "k-crossgen"
Set-Variable -Option Constant "CommandPrefix" "kvm-"
Set-Variable -Option Constant "CommandPrefix" "dnvm-"
Set-Variable -Option Constant "DefaultArchitecture" "x86"
Set-Variable -Option Constant "DefaultRuntime" "clr"
Set-Variable -Option Constant "AliasExtension" ".txt"
# These are intentionally using "%" syntax. The environment variables are expanded whenever the value is used.
Set-Variable -Option Constant "OldUserHome" "%USERPROFILE%\.kre"
Set-Variable -Option Constant "DefaultUserHome" "%USERPROFILE%\.k"
Set-Variable -Option Constant "HomeEnvVar" "KRE_HOME"
Set-Variable -Option Constant "OldUserHomes" @("%USERPROFILE%\.kre","%USERPROFILE%\.k")
Set-Variable -Option Constant "DefaultUserHome" "%USERPROFILE%\$DefaultUserDirectoryName"
Set-Variable -Option Constant "HomeEnvVar" "DNX_HOME"
Set-Variable -Option Constant "AsciiArt" @"
__ ___ ____ ___
/ //_/ | / / |/ /
/ ,< | |/ / /|_/ /
/_/|_| |___/_/ /_/
___ _ ___ ____ ___
/ _ \/ |/ / | / / |/ /
/ // / /| |/ / /|_/ /
/____/_/|_/ |___/_/ /_/
"@
$ExitCodes = @{
@ -102,7 +102,7 @@ $ExitCodes = @{
"InvalidArguments" = 1003
}
$ColorScheme = $KvmColors
$ColorScheme = $DnvmColors
if(!$ColorScheme) {
$ColorScheme = @{
"Banner"=[ConsoleColor]::Cyan
@ -128,20 +128,20 @@ if($__TeeTo) {
$DeprecatedCommands = @("unalias")
# Load Environment variables
$RuntimeHomes = $env:KRE_HOME
$UserHome = $env:KRE_USER_HOME
$ActiveFeed = $env:KRE_FEED
$RuntimeHomes = $env:DNX_HOME
$UserHome = $env:DNX_USER_HOME
$ActiveFeed = $env:DNX_FEED
# Default Exit Code
$Script:ExitCode = $ExitCodes.Success
############################################################
### Below this point, the terms "KVM", "KRE", "K", etc. ###
### Below this point, the terms "DNVM", "DNX", etc. ###
### should never be used. Instead, use the Constants ###
### defined above ###
############################################################
# An exception to the above: The commands are defined by functions
# named "kvm-[command name]" so that extension functions can be added
# named "dnvm-[command name]" so that extension functions can be added
$StartPath = $env:PATH
@ -513,20 +513,24 @@ function Change-Path() {
$newPath = $prependPath
foreach($portion in $existingPaths.Split(';')) {
$skip = $portion -eq ""
foreach($removePath in $removePaths) {
$removePrefix = if($removePath.EndsWith("\")) { $removePath } else { "$removePath\" }
if(![string]::IsNullOrWhiteSpace($portion)) {
$skip = $portion -eq ""
foreach($removePath in $removePaths) {
if(![string]::IsNullOrWhiteSpace($removePath)) {
$removePrefix = if($removePath.EndsWith("\")) { $removePath } else { "$removePath\" }
if ($removePath -and (($portion -eq $removePath) -or ($portion.StartsWith($removePrefix)))) {
_WriteDebug " Removing '$portion' because it matches '$removePath'"
$skip = $true
if ($removePath -and (($portion -eq $removePath) -or ($portion.StartsWith($removePrefix)))) {
_WriteDebug " Removing '$portion' because it matches '$removePath'"
$skip = $true
}
}
}
}
if (!$skip) {
if(![String]::IsNullOrWhiteSpace($newPath)) {
$newPath += ";"
if (!$skip) {
if(![String]::IsNullOrWhiteSpace($newPath)) {
$newPath += ";"
}
$newPath += $portion
}
$newPath += $portion
}
}
return $newPath
@ -596,21 +600,21 @@ function Is-Elevated() {
.PARAMETER Command
A specific command to get help for
#>
function kvm-help {
function dnvm-help {
[CmdletBinding(DefaultParameterSetName="GeneralHelp")]
param(
[Parameter(Mandatory=$true,Position=0,ParameterSetName="SpecificCommand")][string]$Command,
[switch]$PassThru)
if($Command) {
$cmd = Get-Command "kvm-$Command" -ErrorAction SilentlyContinue
$cmd = Get-Command "dnvm-$Command" -ErrorAction SilentlyContinue
if(!$cmd) {
_WriteOut "No such command: $Command"
kvm-help
dnvm-help
$Script:ExitCodes = $ExitCodes.UnknownCommand
return
}
$help = Get-Help "kvm-$Command"
$help = Get-Help "dnvm-$Command"
if($PassThru) {
$help
} else {
@ -708,7 +712,7 @@ function kvm-help {
.PARAMETER PassThru
Set this switch to return unformatted powershell objects for use in scripting
#>
function kvm-list {
function dnvm-list {
param(
[Parameter(Mandatory=$false)][switch]$PassThru)
$aliases = Get-RuntimeAlias
@ -751,7 +755,7 @@ function kvm-list {
Finally, if the '-d' switch is provided, the alias <Name> is deleted, if it exists.
#>
function kvm-alias {
function dnvm-alias {
param(
[Alias("d")]
[Parameter(ParameterSetName="Delete",Mandatory=$true)]
@ -788,11 +792,11 @@ function kvm-alias {
.PARAMETER Name
The name of the alias to remove
#>
function kvm-unalias {
function dnvm-unalias {
param(
[Parameter(Mandatory=$true,Position=0)][string]$Name)
_WriteOut "This command has been deprecated. Use '$CommandName alias -d' instead"
kvm-alias -Delete -Name $Name
dnvm-alias -Delete -Name $Name
}
<#
@ -811,9 +815,9 @@ function kvm-unalias {
.PARAMETER NoNative
Skip generation of native images
.PARAMETER Ngen
For CLR flavor only. Ngen XRE libraries for faster startup. This option requires elevated privilege and will be automatically turned on if the script is running in administrative mode. To opt-out in administrative mode, use -NoNative switch.
For CLR flavor only. Generate native images for runtime libraries on Desktop CLR to improve startup time. This option requires elevated privilege and will be automatically turned on if the script is running in administrative mode. To opt-out in administrative mode, use -NoNative switch.
#>
function kvm-upgrade {
function dnvm-upgrade {
param(
[Alias("a")]
[Parameter(Mandatory=$false, Position=0)]
@ -842,7 +846,7 @@ function kvm-upgrade {
[Parameter(Mandatory=$false)]
[switch]$Ngen)
kvm-install "latest" -Alias:$Alias -Architecture:$Architecture -Runtime:$Runtime -Force:$Force -Proxy:$Proxy -NoNative:$NoNative -Ngen:$Ngen
dnvm-install "latest" -Alias:$Alias -Architecture:$Architecture -Runtime:$Runtime -Force:$Force -Proxy:$Proxy -NoNative:$NoNative -Ngen:$Ngen
}
<#
@ -864,13 +868,12 @@ function kvm-upgrade {
.PARAMETER NoNative
Skip generation of native images
.PARAMETER Ngen
For CLR flavor only. Ngen XRE libraries for faster startup. This option requires elevated privilege and will be automatically turned on if the script is running in administrative mode. To opt-out in administrative mode, use -NoNative switch.
For CLR flavor only. Generate native images for runtime libraries on Desktop CLR to improve startup time. This option requires elevated privilege and will be automatically turned on if the script is running in administrative mode. To opt-out in administrative mode, use -NoNative switch.
.DESCRIPTION
A proxy can also be specified by using the 'http_proxy' environment variable
#>
function kvm-install {
function dnvm-install {
param(
[Parameter(Mandatory=$false, Position=0)]
[string]$VersionOrNuPkg,
@ -904,7 +907,7 @@ function kvm-install {
if(!$VersionOrNuPkg) {
_WriteOut "A version, nupkg path, or the string 'latest' must be provided."
kvm-help install
dnvm-help install
$Script:ExitCode = $ExitCodes.InvalidArguments
return
}
@ -974,7 +977,7 @@ function kvm-install {
_WriteDebug "Cleaning temporary directory $UnpackFolder"
Remove-Item $UnpackFolder -Force | Out-Null
kvm-use $PackageVersion -Architecture:$Architecture -Runtime:$Runtime
dnvm-use $PackageVersion -Architecture:$Architecture -Runtime:$Runtime
if ($Runtime -eq "clr") {
if (-not $NoNative) {
@ -1004,7 +1007,7 @@ function kvm-install {
if($Alias) {
_WriteDebug "Aliasing installed runtime to '$Alias'"
kvm-alias $Alias $PackageVersion -Architecture:$Architecture -Runtime:$Runtime
dnvm-alias $Alias $PackageVersion -Architecture:$Architecture -Runtime:$Runtime
}
}
@ -1021,7 +1024,7 @@ function kvm-install {
.PARAMETER Persistent
Make the change persistent across all processes run by the current user
#>
function kvm-use {
function dnvm-use {
param(
[Parameter(Mandatory=$false, Position=0)]
[string]$VersionOrAlias,
@ -1042,7 +1045,7 @@ function kvm-use {
if([String]::IsNullOrWhiteSpace($VersionOrAlias)) {
_WriteOut "Missing version or alias to add to path"
kvm-help use
dnvm-help use
$Script:ExitCode = $ExitCodes.InvalidArguments
return
}
@ -1087,7 +1090,7 @@ function kvm-use {
.PARAMETER Runtime
The runtime flavor of the runtime to place on the PATH (default: clr, or whatever the alias specifies in the case of use-ing an alias)
#>
function kvm-name {
function dnvm-name {
param(
[Parameter(Mandatory=$false, Position=0)]
[string]$VersionOrAlias,
@ -1109,9 +1112,9 @@ function kvm-name {
.SYNOPSIS
Installs the version manager into your User profile directory
.PARAMETER SkipUserEnvironmentInstall
Set this switch to skip configuring the user-level KRE_HOME and PATH environment variables
Set this switch to skip configuring the user-level DNX_HOME and PATH environment variables
#>
function kvm-setup {
function dnvm-setup {
param(
[switch]$SkipUserEnvironmentInstall)
@ -1182,7 +1185,7 @@ function kvm-setup {
### The main "entry point"
# Check for old KRE_HOME values
# Check for old DNX_HOME values
if($UnencodedHomes -contains $OldUserHome) {
_WriteOut -ForegroundColor Yellow "WARNING: Found '$OldUserHome' in your $HomeEnvVar value. This folder has been deprecated."
if($UnencodedHomes -notcontains $DefaultUserHome) {
@ -1222,12 +1225,12 @@ if(!$cmd) {
# Check for the command
if(Get-Command -Name "$CommandPrefix$cmd" -ErrorAction SilentlyContinue) {
_WriteDebug "& kvm-$cmd $cmdargs"
& "kvm-$cmd" @cmdargs
_WriteDebug "& dnvm-$cmd $cmdargs"
& "dnvm-$cmd" @cmdargs
}
else {
_WriteOut "Unknown command: '$cmd'"
kvm-help
dnvm-help
$Script:ExitCode = $ExitCodes.UnknownCommand
}

View File

@ -1,15 +1,15 @@
# dnvm.sh
# dnvm.sh
# Source this file from your .bash-profile or script to use
# "Constants"
_DNVM_BUILDNUMBER="beta4-10333"
_DNVM_BUILDNUMBER="beta4-10336"
_DNVM_AUTHORS="Microsoft Open Technologies, Inc."
_DNVM_RUNTIME_PACKAGE_NAME="dnx"
_DNVM_RUNTIME_FRIENDLY_NAME="K Runtime"
_DNVM_RUNTIME_FRIENDLY_NAME=".NET Execution Environment"
_DNVM_RUNTIME_SHORT_NAME="DNX"
_DNVM_RUNTIME_FOLDER_NAME=".k"
_DNVM_RUNTIME_FOLDER_NAME=".dnx"
_DNVM_COMMAND_NAME="dnvm"
_DNVM_VERSION_MANAGER_NAME="K Version Manager"
_DNVM_VERSION_MANAGER_NAME=".NET Version Manager"
_DNVM_DEFAULT_FEED="https://www.myget.org/F/aspnetvnext/api/v2"
_DNVM_HOME_VAR_NAME="DNX_HOME"
@ -24,12 +24,12 @@ if __dnvm_has "unsetopt"; then
unsetopt nomatch 2>/dev/null
fi
if [ -z "$DNVM_USER_HOME" ]; then
eval DNVM_USER_HOME="~/$_DNVM_RUNTIME_FOLDER_NAME"
if [ -z "$DNX_USER_HOME" ]; then
eval DNX_USER_HOME="~/$_DNVM_RUNTIME_FOLDER_NAME"
fi
_DNVM_USER_PACKAGES="$DNVM_USER_HOME/runtimes"
_DNVM_ALIAS_DIR="$DNVM_USER_HOME/alias"
_DNVM_USER_PACKAGES="$DNX_USER_HOME/runtimes"
_DNVM_ALIAS_DIR="$DNX_USER_HOME/alias"
if [ -z "$DNX_FEED" ]; then
DNX_FEED="$_DNVM_DEFAULT_FEED"
@ -147,7 +147,7 @@ __dnvm_requested_version_or_alias() {
local runtimeFullName=$(cat "$_DNVM_ALIAS_DIR/$versionOrAlias.alias")
local pkgName=$(echo $runtimeFullName | sed "s/\([^.]*\).*/\1/")
local pkgVersion=$(echo $runtimeFullName | sed "s/[^.]*.\(.*\)/\1/")
local pkgPlatform=$(echo "$pkgName" | sed "s/dnx-\([^.-]*\).*/\1/")
local pkgPlatform=$(echo "$pkgName" | sed "s/$_DNVM_RUNTIME_PACKAGE_NAME-\([^.-]*\).*/\1/")
else
local pkgVersion=$versionOrAlias
local pkgPlatform="mono"
@ -163,64 +163,68 @@ __dnvm_locate_runtime_bin_from_full_name() {
[ -e "$_DNVM_USER_PACKAGES/$runtimeFullName/bin" ] && echo "$_DNVM_USER_PACKAGES/$runtimeFullName/bin" && return
}
__dnvm_help() {
echo ""
echo "$_DNVM_VERSION_MANAGER_NAME - Version 1.0.0-$_DNVM_BUILDNUMBER"
[ "$_DNVM_AUTHORS" != "{{*" ] && echo "By $_DNVM_AUTHORS"
echo ""
echo "USAGE: $_DNVM_COMMAND_NAME <command> [options]"
echo ""
echo "$_DNVM_COMMAND_NAME upgrade"
echo "install latest $_DNVM_RUNTIME_SHORT_NAME from feed"
echo "add $_DNVM_RUNTIME_SHORT_NAME bin to path of current command line"
echo "set installed version as default"
echo ""
echo "$_DNVM_COMMAND_NAME install <semver>|<alias>|<nupkg>|latest [-a|-alias <alias>] [-p -persistent]"
echo "<semver>|<alias> install requested $_DNVM_RUNTIME_SHORT_NAME from feed"
echo "<nupkg> install requested $_DNVM_RUNTIME_SHORT_NAME from local package on filesystem"
echo "latest install latest version of $_DNVM_RUNTIME_SHORT_NAME from feed"
echo "-a|-alias <alias> set alias <alias> for requested $_DNVM_RUNTIME_SHORT_NAME on install"
echo "-p -persistent set installed version as default"
echo "add $_DNVM_RUNTIME_SHORT_NAME bin to path of current command line"
echo ""
echo "$_DNVM_COMMAND_NAME use <semver>|<alias>|<package>|none [-p -persistent]"
echo "<semver>|<alias>|<package> add $_DNVM_RUNTIME_SHORT_NAME bin to path of current command line "
echo "none remove $_DNVM_RUNTIME_SHORT_NAME bin from path of current command line"
echo "-p -persistent set selected version as default"
echo ""
echo "$_DNVM_COMMAND_NAME list"
echo "list $_DNVM_RUNTIME_SHORT_NAME versions installed "
echo ""
echo "$_DNVM_COMMAND_NAME alias"
echo "list $_DNVM_RUNTIME_SHORT_NAME aliases which have been defined"
echo ""
echo "$_DNVM_COMMAND_NAME alias <alias>"
echo "display value of the specified alias"
echo ""
echo "$_DNVM_COMMAND_NAME alias <alias> <semver>|<alias>|<package>"
echo "<alias> the name of the alias to set"
echo "<semver>|<alias>|<package> the $_DNVM_RUNTIME_SHORT_NAME version to set the alias to. Alternatively use the version of the specified alias"
echo ""
echo "$_DNVM_COMMAND_NAME unalias <alias>"
echo "remove the specified alias"
echo ""
}
dnvm()
{
if [ $# -lt 1 ]; then
$_DNVM_COMMAND_NAME help
__dnvm_help
return
fi
case $1 in
"help" )
echo ""
echo "$_DNVM_VERSION_MANAGER_NAME - Version 1.0.0-$_DNVM_BUILDNUMBER"
[ "$_DNVM_AUTHORS" != "{{*" ] && echo "By $_DNVM_AUTHORS"
echo ""
echo "USAGE: $_DNVM_COMMAND_NAME <command> [options]"
echo ""
echo "$_DNVM_COMMAND_NAME upgrade"
echo "install latest $_DNVM_RUNTIME_SHORT_NAME from feed"
echo "add $_DNVM_RUNTIME_SHORT_NAME bin to path of current command line"
echo "set installed version as default"
echo ""
echo "$_DNVM_COMMAND_NAME install <semver>|<alias>|<nupkg>|latest [-a|-alias <alias>] [-p -persistent]"
echo "<semver>|<alias> install requested $_DNVM_RUNTIME_SHORT_NAME from feed"
echo "<nupkg> install requested $_DNVM_RUNTIME_SHORT_NAME from local package on filesystem"
echo "latest install latest version of $_DNVM_RUNTIME_SHORT_NAME from feed"
echo "-a|-alias <alias> set alias <alias> for requested $_DNVM_RUNTIME_SHORT_NAME on install"
echo "-p -persistent set installed version as default"
echo "add $_DNVM_RUNTIME_SHORT_NAME bin to path of current command line"
echo ""
echo "$_DNVM_COMMAND_NAME use <semver>|<alias>|<package>|none [-p -persistent]"
echo "<semver>|<alias>|<package> add $_DNVM_RUNTIME_SHORT_NAME bin to path of current command line "
echo "none remove $_DNVM_RUNTIME_SHORT_NAME bin from path of current command line"
echo "-p -persistent set selected version as default"
echo ""
echo "$_DNVM_COMMAND_NAME list"
echo "list $_DNVM_RUNTIME_SHORT_NAME versions installed "
echo ""
echo "$_DNVM_COMMAND_NAME alias"
echo "list $_DNVM_RUNTIME_SHORT_NAME aliases which have been defined"
echo ""
echo "$_DNVM_COMMAND_NAME alias <alias>"
echo "display value of the specified alias"
echo ""
echo "$_DNVM_COMMAND_NAME alias <alias> <semver>|<alias>|<package>"
echo "<alias> the name of the alias to set"
echo "<semver>|<alias>|<package> the $_DNVM_RUNTIME_SHORT_NAME version to set the alias to. Alternatively use the version of the specified alias"
echo ""
echo "$_DNVM_COMMAND_NAME unalias <alias>"
echo "remove the specified alias"
echo ""
__dnvm_help
;;
"upgrade" )
[ $# -ne 1 ] && dnvm help && return
[ $# -ne 1 ] && __dnvm_help && return
$_DNVM_COMMAND_NAME install latest -p
;;
"install" )
[ $# -lt 2 ] && dnvm help && return
[ $# -lt 2 ] && __dnvm_help && return
shift
local persistent=
local versionOrAlias=
@ -233,7 +237,7 @@ dnvm()
local alias=$2
shift
elif [[ -n $1 ]]; then
[[ -n $versionOrAlias ]] && echo "Invalid option $1" && dnvm help && return 1
[[ -n $versionOrAlias ]] && echo "Invalid option $1" && __dnvm_help && return 1
local versionOrAlias=$1
fi
shift
@ -259,20 +263,20 @@ dnvm()
[[ $? == 1 ]] && return 1
fi
$_DNVM_COMMAND_NAME use "$runtimeVersion" "$persistent"
[[ -n $alias ]] && dnvm alias "$alias" "$runtimeVersion"
[[ -n $alias ]] && $_DNVM_COMMAND_NAME alias "$alias" "$runtimeVersion"
else
local runtimeFullName="$(__dnvm_requested_version_or_alias $versionOrAlias)"
local runtimeFolder="$_DNVM_USER_PACKAGES/$runtimeFullName"
__dnvm_download "$runtimeFullName" "$runtimeFolder"
[[ $? == 1 ]] && return 1
$_DNVM_COMMAND_NAME use "$versionOrAlias" "$persistent"
[[ -n $alias ]] && dnvm alias "$alias" "$versionOrAlias"
[[ -n $alias ]] && $_DNVM_COMMAND_NAME alias "$alias" "$versionOrAlias"
fi
;;
"use" )
[ $# -gt 3 ] && $_DNVM_COMMAND_NAME help && return
[ $# -lt 2 ] && $_DNVM_COMMAND_NAME help && return
[ $# -gt 3 ] && __dnvm_help && return
[ $# -lt 2 ] && __dnvm_help && return
shift
local persistent=
@ -318,7 +322,7 @@ dnvm()
;;
"alias" )
[[ $# -gt 3 ]] && dnvm help && return
[[ $# -gt 3 ]] && __dnvm_help && return
[[ ! -e "$_DNVM_ALIAS_DIR/" ]] && mkdir "$_DNVM_ALIAS_DIR/" > /dev/null
@ -358,7 +362,7 @@ dnvm()
;;
"unalias" )
[[ $# -ne 2 ]] && dnvm help && return
[[ $# -ne 2 ]] && __dnvm_help && return
local name=$2
local aliasPath="$_DNVM_ALIAS_DIR/$name.alias"
@ -368,7 +372,7 @@ dnvm()
;;
"list" )
[[ $# -gt 2 ]] && dnvm help && return
[[ $# -gt 2 ]] && __dnvm_help && return
[[ ! -d $_DNVM_USER_PACKAGES ]] && echo "$_DNVM_RUNTIME_FRIENDLY_NAME is not installed." && return 1

15
dnvminstall.ps1 Normal file
View File

@ -0,0 +1,15 @@
$tempPath = Join-Path $env:TEMP "dnvminstall"
$kvmPs1Path = Join-Path $tempPath "dnvm.ps1"
$kvmCmdPath = Join-Path $tempPath "dnvm.cmd"
Write-Host "Using temporary directory: $tempPath"
if (!(Test-Path $tempPath)) { md $tempPath | Out-Null }
$webClient = New-Object System.Net.WebClient
Write-Host "Downloading DNVM.ps1 to $dnvmPs1Path"
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.ps1', $kvmPs1Path)
Write-Host "Downloading DNVM.cmd to $dnvmCmdPath"
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/dnvm.cmd', $kvmCmdPath)
Write-Host "Installing DNVM"
& $kvmCmdPath setup

View File

@ -1,15 +0,0 @@
$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 (!(Test-Path $tempPath)) { md $tempPath | Out-Null }
$webClient = New-Object System.Net.WebClient
Write-Host "Downloading KVM.ps1 to $kvmPs1Path"
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/kvm.ps1', $kvmPs1Path)
Write-Host "Downloading KVM.cmd to $kvmCmdPath"
$webClient.DownloadFile('https://raw.githubusercontent.com/aspnet/Home/dev/kvm.cmd', $kvmCmdPath)
Write-Host "Installing KVM"
& $kvmCmdPath setup