From 27243a62bc19b50060c5eed154ea413a6c110496 Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Thu, 7 Aug 2025 23:57:43 +0800 Subject: [PATCH] Format ps1 file --- tool/download-pre-on-GitHub.ps1 | 38 ++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/tool/download-pre-on-GitHub.ps1 b/tool/download-pre-on-GitHub.ps1 index 69ffefb..06e2757 100644 --- a/tool/download-pre-on-GitHub.ps1 +++ b/tool/download-pre-on-GitHub.ps1 @@ -4,7 +4,7 @@ # File Name : download-pre-on-GitHub.ps1 # File Authors : Aoran Zeng # Created On : <2023-09-21> -# Last Modified : <2025-07-22> +# Last Modified : <2025-08-07> # # Download all files from the `pre` release on GitHub: # https://github.com/RubyMetric/chsrc/releases/tag/pre @@ -18,19 +18,19 @@ mkdir -Force $destination | Out-Null $destination = (Resolve-Path $destination).Path $names = @( - 'chsrc-x64-windows.exe' - 'chsrc-x86-windows.exe' + 'chsrc-x64-windows.exe' + 'chsrc-x86-windows.exe' - 'chsrc-aarch64-macos' - 'chsrc-x64-macos' + 'chsrc-aarch64-macos' + 'chsrc-x64-macos' - 'chsrc-x64-linux' - 'chsrc-aarch64-linux' - 'chsrc-riscv64-linux' - 'chsrc-armv7-linux' - 'chsrc_latest-1_amd64.deb' + 'chsrc-x64-linux' + 'chsrc-aarch64-linux' + 'chsrc-riscv64-linux' + 'chsrc-armv7-linux' + 'chsrc_latest-1_amd64.deb' - 'chsrc-arm64-android' + 'chsrc-arm64-android' ) # 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/" Write-Output "=> Starting downloads..." $names | ForEach-Object -Parallel { - $name = $_ - $url = $using:url_prefix + $name - $dest = $using:destination + $name = $_ + $url = $using:url_prefix + $name + $dest = $using:destination - Write-Output " - Downloading $name" - # -s 阻止输出,避免并行输出混乱 - # 此处必须使用绝对路径 - curl -s -LO $url --output-dir $dest - Write-Output " √ Completed $name" + Write-Output " - Downloading $name" + # -s 阻止输出,避免并行输出混乱 + # 此处必须使用绝对路径 + curl -s -LO $url --output-dir $dest + Write-Output " √ Completed $name" } -ThrottleLimit 5 # 限制同时下载5个文件 Write-Output "=> All downloads completed!"