2
2
# Source this file from your .bash-profile or script to use
3
3
4
4
# "Constants"
5
- _DNVM_BUILDNUMBER=" rc1-15528 "
5
+ _DNVM_BUILDNUMBER=" rc1-15530 "
6
6
_DNVM_AUTHORS=" Microsoft Open Technologies, Inc."
7
7
_DNVM_RUNTIME_PACKAGE_NAME=" dnx"
8
8
_DNVM_RUNTIME_FRIENDLY_NAME=" .NET Execution Environment"
@@ -38,6 +38,10 @@ __dnvm_has() {
38
38
return $?
39
39
}
40
40
41
+ __dnvm_to_lower () {
42
+ echo " $1 " | tr ' [:upper:]' ' [:lower:]'
43
+ }
44
+
41
45
if __dnvm_has " unsetopt" ; then
42
46
unsetopt nomatch 2> /dev/null
43
47
fi
@@ -550,15 +554,15 @@ dnvm()
550
554
elif [[ $1 == " -u" || $1 == " -unstable" ]]; then
551
555
local unstable=" -u"
552
556
elif [[ $1 == " -r" || $1 == " -runtime" ]]; then
553
- local runtime=$2
557
+ local runtime=$( __dnvm_to_lower " $2 " )
554
558
shift
555
559
elif [[ $1 == " -OS" ]]; then
556
- local os=$2
560
+ local os=$( __dnvm_to_lower " $2 " )
557
561
shift
558
562
elif [[ $1 == " -y" ]]; then
559
563
local acceptSudo=1
560
564
elif [[ $1 == " -a" || $1 == " -arch" ]]; then
561
- local arch=$2
565
+ local arch=$( __dnvm_to_lower " $2 " )
562
566
shift
563
567
564
568
if [[ $arch != " x86" && $arch != " x64" ]]; then
@@ -697,13 +701,13 @@ dnvm()
697
701
while [ $# -ne 0 ]
698
702
do
699
703
if [[ $1 == " -r" || $1 == " -runtime" ]]; then
700
- local runtime=$2
704
+ local runtime=$( __dnvm_to_lower " $2 " )
701
705
shift
702
706
elif [[ $1 == " -a" || $1 == " -arch" ]]; then
703
- local architecture=$2
707
+ local architecture=$( __dnvm_to_lower " $2 " )
704
708
shift
705
709
elif [[ $1 == " -OS" ]]; then
706
- local os=$2
710
+ local os=$( __dnvm_to_lower " $2 " )
707
711
shift
708
712
elif [[ $1 == " -y" ]]; then
709
713
local acceptSudo=1
@@ -774,10 +778,10 @@ dnvm()
774
778
if [[ $1 == " -p" || $1 == " -persistent" ]]; then
775
779
local persistent=" true"
776
780
elif [[ $1 == " -a" || $1 == " -arch" ]]; then
777
- local arch=$2
781
+ local arch=$( __dnvm_to_lower " $2 " )
778
782
shift
779
783
elif [[ $1 == " -r" || $1 == " -runtime" ]]; then
780
- local runtime=$2
784
+ local runtime=$( __dnvm_to_lower " $2 " )
781
785
shift
782
786
elif [[ $1 == -* ]]; then
783
787
echo " Invalid option $1 " && __dnvm_help && return 1
@@ -791,10 +795,10 @@ dnvm()
791
795
while [ $# -ne 0 ]
792
796
do
793
797
if [[ $1 == " -a" || $1 == " -arch" ]]; then
794
- local arch=$2
798
+ local arch=$( __dnvm_to_lower " $2 " )
795
799
shift
796
800
elif [[ $1 == " -r" || $1 == " -runtime" ]]; then
797
- local runtime=$2
801
+ local runtime=$( __dnvm_to_lower " $2 " )
798
802
shift
799
803
elif [[ -n $1 ]]; then
800
804
[[ -n $versionOrAlias ]] && break
@@ -857,7 +861,7 @@ dnvm()
857
861
;;
858
862
859
863
" alias" )
860
- [[ $# -gt 7 ]] && __dnvm_help && return
864
+ [[ $# -gt 9 ]] && __dnvm_help && return
861
865
862
866
[[ ! -e " $_DNVM_ALIAS_DIR /" ]] && mkdir " $_DNVM_ALIAS_DIR /" > /dev/null
863
867
@@ -902,13 +906,13 @@ dnvm()
902
906
while [ $# -ne 0 ]
903
907
do
904
908
if [[ $1 == " -a" || $1 == " -arch" ]]; then
905
- local arch=$2
909
+ local arch=$( __dnvm_to_lower " $2 " )
906
910
shift
907
911
elif [[ $1 == " -r" || $1 == " -runtime" ]]; then
908
- local runtime=$2
912
+ local runtime=$( __dnvm_to_lower " $2 " )
909
913
shift
910
914
elif [[ $1 == " -OS" ]]; then
911
- local os=$2
915
+ local os=$( __dnvm_to_lower " $2 " )
912
916
shift
913
917
fi
914
918
shift
0 commit comments