mirror of
https://github.com/RubyMetric/chsrc
synced 2025-07-20 23:26:47 +08:00
Fix destination
This commit is contained in:
parent
35f85e048a
commit
5ac415801c
@ -4,7 +4,7 @@
|
||||
# File Name : download-pre-on-GitHub.ps1
|
||||
# File Authors : Aoran Zeng <ccmywish@qq.com>
|
||||
# Created On : <2023-09-21>
|
||||
# Last Modified : <2025-07-13>
|
||||
# Last Modified : <2025-07-15>
|
||||
#
|
||||
# Download all files from the `pre` release on GitHub:
|
||||
# https://github.com/RubyMetric/chsrc/releases/tag/pre
|
||||
@ -14,7 +14,8 @@ $destination = "~\Desktop\chsrc-pre-on-GitHub"
|
||||
|
||||
Write-Output "=> Mkdir $destination"
|
||||
mkdir -Force $destination | Out-Null
|
||||
Set-Location $destination
|
||||
|
||||
$destination = (Resolve-Path $destination).Path
|
||||
|
||||
$names = @(
|
||||
'chsrc-x64-windows.exe'
|
||||
@ -40,11 +41,11 @@ $names | ForEach-Object -Parallel {
|
||||
|
||||
Write-Output " - Downloading $name"
|
||||
# -s 阻止输出,避免并行输出混乱
|
||||
# 此处必须使用绝对路径
|
||||
curl -s -LO $url --output-dir $dest
|
||||
Write-Output " √ Completed $name"
|
||||
} -ThrottleLimit 5 # 限制同时下载5个文件
|
||||
|
||||
Write-Output "=> All downloads completed!"
|
||||
|
||||
Set-Location -
|
||||
Write-Output "=> Downloaded to $destination"
|
||||
|
Loading…
x
Reference in New Issue
Block a user