mirror of
https://github.com/Baipyrus/dotfiles.git
synced 2024-12-25 10:51:46 +00:00
optimize download without progressbar
This commit is contained in:
parent
107b83ced4
commit
fa7d942a8f
@ -78,9 +78,16 @@ function ProcessUrlFiles
|
||||
param (
|
||||
[string]$source,
|
||||
[Parameter(Mandatory=$false)][string]$destination,
|
||||
[Parameter(Mandatory=$false)][string]$fileExt
|
||||
[Parameter(Mandatory=$false)][string]$fileExt,
|
||||
[bool]$progress=$true
|
||||
)
|
||||
|
||||
# Disable progressbar for faster download
|
||||
$progressPreference = 'continue'
|
||||
if (-not $progress)
|
||||
{ $progressPreference = 'silentlyContinue'
|
||||
}
|
||||
|
||||
# Ensure the destination directory exists
|
||||
if ($destination -and (-not (Test-Path $destination)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user