Skip to content

Commit 3b532d4

Browse files
ASP.NET Push Botunknown
authored andcommitted
⬆️ dnvm.ps1, dnvm.cmd, dnvm.sh
Source: aspnet/dnvm@703c1ff
1 parent e9bc588 commit 3b532d4

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

dnvm.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function _WriteOut {
6767

6868
### Constants
6969
$ProductVersion="1.0.0"
70-
$BuildVersion="rc1-15528"
70+
$BuildVersion="rc1-15530"
7171
$Authors="Microsoft Open Technologies, Inc."
7272

7373
# If the Version hasn't been replaced...

dnvm.sh

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Source this file from your .bash-profile or script to use
33

44
# "Constants"
5-
_DNVM_BUILDNUMBER="rc1-15528"
5+
_DNVM_BUILDNUMBER="rc1-15530"
66
_DNVM_AUTHORS="Microsoft Open Technologies, Inc."
77
_DNVM_RUNTIME_PACKAGE_NAME="dnx"
88
_DNVM_RUNTIME_FRIENDLY_NAME=".NET Execution Environment"
@@ -38,6 +38,10 @@ __dnvm_has() {
3838
return $?
3939
}
4040

41+
__dnvm_to_lower() {
42+
echo "$1" | tr '[:upper:]' '[:lower:]'
43+
}
44+
4145
if __dnvm_has "unsetopt"; then
4246
unsetopt nomatch 2>/dev/null
4347
fi
@@ -550,15 +554,15 @@ dnvm()
550554
elif [[ $1 == "-u" || $1 == "-unstable" ]]; then
551555
local unstable="-u"
552556
elif [[ $1 == "-r" || $1 == "-runtime" ]]; then
553-
local runtime=$2
557+
local runtime=$(__dnvm_to_lower "$2")
554558
shift
555559
elif [[ $1 == "-OS" ]]; then
556-
local os=$2
560+
local os=$(__dnvm_to_lower "$2")
557561
shift
558562
elif [[ $1 == "-y" ]]; then
559563
local acceptSudo=1
560564
elif [[ $1 == "-a" || $1 == "-arch" ]]; then
561-
local arch=$2
565+
local arch=$(__dnvm_to_lower "$2")
562566
shift
563567

564568
if [[ $arch != "x86" && $arch != "x64" ]]; then
@@ -697,13 +701,13 @@ dnvm()
697701
while [ $# -ne 0 ]
698702
do
699703
if [[ $1 == "-r" || $1 == "-runtime" ]]; then
700-
local runtime=$2
704+
local runtime=$(__dnvm_to_lower "$2")
701705
shift
702706
elif [[ $1 == "-a" || $1 == "-arch" ]]; then
703-
local architecture=$2
707+
local architecture=$(__dnvm_to_lower "$2")
704708
shift
705709
elif [[ $1 == "-OS" ]]; then
706-
local os=$2
710+
local os=$(__dnvm_to_lower "$2")
707711
shift
708712
elif [[ $1 == "-y" ]]; then
709713
local acceptSudo=1
@@ -774,10 +778,10 @@ dnvm()
774778
if [[ $1 == "-p" || $1 == "-persistent" ]]; then
775779
local persistent="true"
776780
elif [[ $1 == "-a" || $1 == "-arch" ]]; then
777-
local arch=$2
781+
local arch=$(__dnvm_to_lower "$2")
778782
shift
779783
elif [[ $1 == "-r" || $1 == "-runtime" ]]; then
780-
local runtime=$2
784+
local runtime=$(__dnvm_to_lower "$2")
781785
shift
782786
elif [[ $1 == -* ]]; then
783787
echo "Invalid option $1" && __dnvm_help && return 1
@@ -791,10 +795,10 @@ dnvm()
791795
while [ $# -ne 0 ]
792796
do
793797
if [[ $1 == "-a" || $1 == "-arch" ]]; then
794-
local arch=$2
798+
local arch=$(__dnvm_to_lower "$2")
795799
shift
796800
elif [[ $1 == "-r" || $1 == "-runtime" ]]; then
797-
local runtime=$2
801+
local runtime=$(__dnvm_to_lower "$2")
798802
shift
799803
elif [[ -n $1 ]]; then
800804
[[ -n $versionOrAlias ]] && break
@@ -857,7 +861,7 @@ dnvm()
857861
;;
858862

859863
"alias" )
860-
[[ $# -gt 7 ]] && __dnvm_help && return
864+
[[ $# -gt 9 ]] && __dnvm_help && return
861865

862866
[[ ! -e "$_DNVM_ALIAS_DIR/" ]] && mkdir "$_DNVM_ALIAS_DIR/" > /dev/null
863867

@@ -902,13 +906,13 @@ dnvm()
902906
while [ $# -ne 0 ]
903907
do
904908
if [[ $1 == "-a" || $1 == "-arch" ]]; then
905-
local arch=$2
909+
local arch=$(__dnvm_to_lower "$2")
906910
shift
907911
elif [[ $1 == "-r" || $1 == "-runtime" ]]; then
908-
local runtime=$2
912+
local runtime=$(__dnvm_to_lower "$2")
909913
shift
910914
elif [[ $1 == "-OS" ]]; then
911-
local os=$2
915+
local os=$(__dnvm_to_lower "$2")
912916
shift
913917
fi
914918
shift

0 commit comments

Comments
 (0)