parent
9992c4ad36
commit
dd9ad89c51
12
dnvm.ps1
12
dnvm.ps1
|
|
@ -67,7 +67,7 @@ function _WriteOut {
|
|||
|
||||
### Constants
|
||||
$ProductVersion="1.0.0"
|
||||
$BuildVersion="beta8-15510"
|
||||
$BuildVersion="beta8-15511"
|
||||
$Authors="Microsoft Open Technologies, Inc."
|
||||
|
||||
# If the Version hasn't been replaced...
|
||||
|
|
@ -400,8 +400,12 @@ function Get-RuntimeAliasOrRuntimeInfo(
|
|||
if(Test-Path $aliasPath) {
|
||||
$BaseName = Get-Content $aliasPath
|
||||
|
||||
$Architecture = Get-PackageArch $BaseName
|
||||
$Runtime = Get-PackageRuntime $BaseName
|
||||
if(!$Architecture) {
|
||||
$Architecture = Get-PackageArch $BaseName
|
||||
}
|
||||
if(!$Runtime) {
|
||||
$Runtime = Get-PackageRuntime $BaseName
|
||||
}
|
||||
$Version = Get-PackageVersion $BaseName
|
||||
$OS = Get-PackageOS $BaseName
|
||||
}
|
||||
|
|
@ -1550,7 +1554,7 @@ function dnvm-use {
|
|||
return;
|
||||
}
|
||||
|
||||
$runtimeInfo = Get-RuntimeAliasOrRuntimeInfo -Version:$VersionOrAlias -Architecture:$Architecture -Runtime:$Runtime -OS:$OS
|
||||
$runtimeInfo = Get-RuntimeAliasOrRuntimeInfo -Version:$VersionOrAlias -Architecture:$Architecture -Runtime:$Runtime -OS:$OS
|
||||
$runtimeFullName = $runtimeInfo.RuntimeName
|
||||
$runtimeBin = Get-RuntimePath $runtimeFullName
|
||||
if ($runtimeBin -eq $null) {
|
||||
|
|
|
|||
42
dnvm.sh
42
dnvm.sh
|
|
@ -2,7 +2,7 @@
|
|||
# Source this file from your .bash-profile or script to use
|
||||
|
||||
# "Constants"
|
||||
_DNVM_BUILDNUMBER="beta8-15510"
|
||||
_DNVM_BUILDNUMBER="beta8-15511"
|
||||
_DNVM_AUTHORS="Microsoft Open Technologies, Inc."
|
||||
_DNVM_RUNTIME_PACKAGE_NAME="dnx"
|
||||
_DNVM_RUNTIME_FRIENDLY_NAME=".NET Execution Environment"
|
||||
|
|
@ -333,24 +333,30 @@ __dnvm_requested_version_or_alias() {
|
|||
else
|
||||
if [ -e "$_DNVM_ALIAS_DIR/$versionOrAlias.alias" ]; then
|
||||
local runtimeFullName=$(cat "$_DNVM_ALIAS_DIR/$versionOrAlias.alias")
|
||||
echo "$runtimeFullName"
|
||||
else
|
||||
local pkgVersion=$versionOrAlias
|
||||
local pkgArchitecture="x64"
|
||||
local pkgSystem=$os
|
||||
|
||||
if [[ -z $runtime || "$runtime" == "mono" ]]; then
|
||||
echo "$_DNVM_RUNTIME_PACKAGE_NAME-mono.$pkgVersion"
|
||||
else
|
||||
if [ "$arch" != "" ]; then
|
||||
local pkgArchitecture="$arch"
|
||||
fi
|
||||
if [ "$os" == "" ]; then
|
||||
local pkgSystem=$(__dnvm_current_os)
|
||||
fi
|
||||
|
||||
echo "$_DNVM_RUNTIME_PACKAGE_NAME-$runtime-$pkgSystem-$pkgArchitecture.$pkgVersion"
|
||||
if [[ ! -n "$runtime" && ! -n "$arch" ]]; then
|
||||
echo "$runtimeFullName"
|
||||
return
|
||||
fi
|
||||
local pkgVersion=$(__dnvm_package_version "$runtimeFullName")
|
||||
fi
|
||||
|
||||
if [[ ! -n "$pkgVersion" ]]; then
|
||||
local pkgVersion=$versionOrAlias
|
||||
fi
|
||||
local pkgArchitecture="x64"
|
||||
local pkgSystem=$os
|
||||
|
||||
if [[ -z $runtime || "$runtime" == "mono" ]]; then
|
||||
echo "$_DNVM_RUNTIME_PACKAGE_NAME-mono.$pkgVersion"
|
||||
else
|
||||
if [ "$arch" != "" ]; then
|
||||
local pkgArchitecture="$arch"
|
||||
fi
|
||||
if [ "$os" == "" ]; then
|
||||
local pkgSystem=$(__dnvm_current_os)
|
||||
fi
|
||||
|
||||
echo "$_DNVM_RUNTIME_PACKAGE_NAME-$runtime-$pkgSystem-$pkgArchitecture.$pkgVersion"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue