Add -SkipNonVersionedFiles to dotnet-install.{sh,ps1}
This commit is contained in:
parent
4662629964
commit
7586ad844d
2 changed files with 14 additions and 3 deletions
9
scripts/obtain/dotnet-install.sh
vendored
9
scripts/obtain/dotnet-install.sh
vendored
|
@ -541,7 +541,7 @@ extract_dotnet_package() {
|
|||
|
||||
local folders_with_version_regex='^.*/[0-9]+\.[0-9]+[^/]+/'
|
||||
find $temp_out_path -type f | grep -Eo $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path false
|
||||
find $temp_out_path -type f | grep -Ev $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path true
|
||||
find $temp_out_path -type f | grep -Ev $folders_with_version_regex | copy_files_or_dirs_from_list $temp_out_path $out_path $override_non_versioned_files
|
||||
|
||||
rm -rf $temp_out_path
|
||||
|
||||
|
@ -687,6 +687,7 @@ uncached_feed="https://dotnetcli.blob.core.windows.net/dotnet"
|
|||
verbose=false
|
||||
shared_runtime=false
|
||||
runtime_id=""
|
||||
override_non_versioned_files=true
|
||||
|
||||
while [ $# -ne 0 ]
|
||||
do
|
||||
|
@ -732,6 +733,10 @@ do
|
|||
shift
|
||||
runtime_id="$1"
|
||||
;;
|
||||
--skip-non-versioned-files|-[Ss]kip[Nn]on[Vv]ersioned[Ff]iles)
|
||||
shift
|
||||
override_non_versioned_files=false
|
||||
;;
|
||||
-?|--?|-h|--help|-[Hh]elp)
|
||||
script_name="$(basename $0)"
|
||||
echo ".NET Tools Installer"
|
||||
|
@ -764,6 +769,8 @@ do
|
|||
echo " --arch,-Architecture,-Arch"
|
||||
echo " --shared-runtime Installs just the shared runtime bits, not the entire SDK."
|
||||
echo " -SharedRuntime"
|
||||
echo " --skip-non-versioned-files Skips non-versioned files if they already exist, such as the dotnet executable."
|
||||
echo " -SkipNonVersionedFiles"
|
||||
echo " --dry-run,-DryRun Do not perform installation. Display download link."
|
||||
echo " --no-path, -NoPath Do not set PATH for the current process."
|
||||
echo " --verbose,-Verbose Display diagnostics information."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue