Fix destination

This commit is contained in:
Aoran Zeng 2025-07-15 07:57:14 +08:00
parent 35f85e048a
commit 5ac415801c
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98

View File

@ -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"