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