chsrc/tool/download-pre-onGitHub.ps1

36 lines
982 B
PowerShell
Raw Normal View History

2024-05-24 16:15:02 +08:00
# ---------------------------------------------------------------
2024-10-25 14:09:34 +08:00
# File Name : download-pre-onGitHub.ps1
# File Authors : Aoran Zeng <ccmywish@qq.com>
# Created On : <2023-09-21>
# Last Modified : <2024-10-25>
2024-05-24 16:15:02 +08:00
#
2024-10-25 14:09:34 +08:00
# Download all files from the `pre` release on GitHub
2024-05-24 16:15:02 +08:00
# ---------------------------------------------------------------
2024-10-25 14:09:34 +08:00
$destination = "~\Desktop\chsrc-pre-onGitHub"
2024-05-24 16:15:02 +08:00
Write-Output "=> Mkdir $destination"
mkdir -Force $destination | Out-Null
Set-Location $destination
$names = @(
'chsrc-x64-windows.exe'
'chsrc-x86-windows.exe'
2024-06-08 18:14:30 +08:00
'chsrc-aarch64-macos'
2024-05-24 16:15:02 +08:00
'chsrc-x64-macos'
'chsrc-x64-linux'
'chsrc-aarch64-linux'
'chsrc-riscv64-linux'
'chsrc-armv7-linux'
)
2024-05-25 01:30:42 +08:00
# Like https://github.com/RubyMetric/chsrc/releases/download/latest/chsrc-x64-windows.exe
2024-06-11 23:40:43 +08:00
$url_prefix = "https://github.com/RubyMetric/chsrc/releases/download/pre/"
2024-05-24 16:15:02 +08:00
foreach ($name in $names) {
curl -LO "${url_prefix}${name}"
}
Set-Location -
Write-Output "=> Downloaded to $destination"