don't redownload sdk in install.sh if package already installed

This commit is contained in:
Krzysztof Wicher 2016-03-24 15:14:51 -07:00
parent 688de72eb7
commit 217922da14

View file

@ -236,6 +236,27 @@ get_commit_hash_from_version_info() {
return 0
}
# args:
# install_root - $1
# relative_path_to_package - $2
# specific_version - $3
is_dotnet_package_installed() {
eval $invocation
local install_root=$1
local relative_path_to_package=$2
local specific_version=$3
local dotnet_package_path=$(combine_paths $(combine_paths $install_root $relative_path_to_package) $specific_version)
say_verbose "is_dotnet_package_installed: dotnet_package_path=$dotnet_package_path"
if [ -d "$dotnet_package_path" ]; then
return 0
else
return 1
fi
}
# args:
# azure_feed - $1
# azure_channel - $2
@ -483,7 +504,12 @@ calculate_vars() {
install_dotnet() {
eval $invocation
if is_dotnet_package_installed $install_root "sdk" $specific_version; then
say ".NET SDK version $specific_version is already installed."
return 0
fi
mkdir -p $install_root
zip_path=$(mktemp $temporary_file_template)
say_verbose "Zip path: $zip_path"