Skip to content

Commit 27243a6

Browse files
committed
Format ps1 file
1 parent 43131e3 commit 27243a6

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

tool/download-pre-on-GitHub.ps1

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# File Name : download-pre-on-GitHub.ps1
55
# File Authors : Aoran Zeng <ccmywish@qq.com>
66
# Created On : <2023-09-21>
7-
# Last Modified : <2025-07-22>
7+
# Last Modified : <2025-08-07>
88
#
99
# Download all files from the `pre` release on GitHub:
1010
# https://github.com/RubyMetric/chsrc/releases/tag/pre
@@ -18,19 +18,19 @@ mkdir -Force $destination | Out-Null
1818
$destination = (Resolve-Path $destination).Path
1919

2020
$names = @(
21-
'chsrc-x64-windows.exe'
22-
'chsrc-x86-windows.exe'
21+
'chsrc-x64-windows.exe'
22+
'chsrc-x86-windows.exe'
2323

24-
'chsrc-aarch64-macos'
25-
'chsrc-x64-macos'
24+
'chsrc-aarch64-macos'
25+
'chsrc-x64-macos'
2626

27-
'chsrc-x64-linux'
28-
'chsrc-aarch64-linux'
29-
'chsrc-riscv64-linux'
30-
'chsrc-armv7-linux'
31-
'chsrc_latest-1_amd64.deb'
27+
'chsrc-x64-linux'
28+
'chsrc-aarch64-linux'
29+
'chsrc-riscv64-linux'
30+
'chsrc-armv7-linux'
31+
'chsrc_latest-1_amd64.deb'
3232

33-
'chsrc-arm64-android'
33+
'chsrc-arm64-android'
3434
)
3535

3636
# Like https://github.com/RubyMetric/chsrc/releases/download/latest/chsrc-x64-windows.exe
@@ -39,15 +39,15 @@ $url_prefix = "https://github.com/RubyMetric/chsrc/releases/download/pre/"
3939
Write-Output "=> Starting downloads..."
4040

4141
$names | ForEach-Object -Parallel {
42-
$name = $_
43-
$url = $using:url_prefix + $name
44-
$dest = $using:destination
45-
46-
Write-Output " - Downloading $name"
47-
# -s 阻止输出,避免并行输出混乱
48-
# 此处必须使用绝对路径
49-
curl -s -LO $url --output-dir $dest
50-
Write-Output " √ Completed $name"
42+
$name = $_
43+
$url = $using:url_prefix + $name
44+
$dest = $using:destination
45+
46+
Write-Output " - Downloading $name"
47+
# -s 阻止输出,避免并行输出混乱
48+
# 此处必须使用绝对路径
49+
curl -s -LO $url --output-dir $dest
50+
Write-Output " √ Completed $name"
5151
} -ThrottleLimit 5 # 限制同时下载5个文件
5252

5353
Write-Output "=> All downloads completed!"

0 commit comments

Comments
 (0)