don't redownload sdk in install.sh if package already installed
This commit is contained in:
parent
688de72eb7
commit
217922da14
1 changed files with 27 additions and 1 deletions
|
@ -236,6 +236,27 @@ get_commit_hash_from_version_info() {
|
||||||
return 0
|
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:
|
# args:
|
||||||
# azure_feed - $1
|
# azure_feed - $1
|
||||||
# azure_channel - $2
|
# azure_channel - $2
|
||||||
|
@ -484,6 +505,11 @@ calculate_vars() {
|
||||||
install_dotnet() {
|
install_dotnet() {
|
||||||
eval $invocation
|
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
|
mkdir -p $install_root
|
||||||
zip_path=$(mktemp $temporary_file_template)
|
zip_path=$(mktemp $temporary_file_template)
|
||||||
say_verbose "Zip path: $zip_path"
|
say_verbose "Zip path: $zip_path"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue