From 71854c19a9474989d4fd684b300bb9892604962f Mon Sep 17 00:00:00 2001 From: Aoran Zeng Date: Fri, 24 May 2024 16:15:02 +0800 Subject: [PATCH] Rename to download-release --- tool/download-release.ps1 | 42 +++++++++++++++++++++++++++++++++++++++ tools/download.ps1 | 8 -------- 2 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 tool/download-release.ps1 delete mode 100644 tools/download.ps1 diff --git a/tool/download-release.ps1 b/tool/download-release.ps1 new file mode 100644 index 0000000..2d2adbd --- /dev/null +++ b/tool/download-release.ps1 @@ -0,0 +1,42 @@ +# --------------------------------------------------------------- +# File : download-release.ps1 +# Authors : Aoran Zeng +# Created on : <2023-09-21> +# Last modified : <2024-05-24> +# +# download: +# +# Download from GitHub Releases +# ---------- +# Changelog: +# +# ~> v0.1.0 +# <2024-05-24> Rename to download-release +# <2023-09-21> Create file +# --------------------------------------------------------------- + +$destination = "~\Desktop\chsrc-GitHub-release" + +Write-Output "=> Mkdir $destination" +mkdir -Force $destination | Out-Null +Set-Location $destination + +$names = @( + 'chsrc-x64-windows.exe' + 'chsrc-x86-windows.exe' + 'chsrc-x64-macos' + 'chsrc-x64-linux' + 'chsrc-aarch64-linux' + 'chsrc-riscv64-linux' + 'chsrc-armv7-linux' +) + +# Like https://github.com/RubyMetric/chsrc/releases/download/preview/chsrc-x64-windows.exe +$url_prefix = "https://github.com/RubyMetric/chsrc/releases/download/preview/" + +foreach ($name in $names) { + curl -LO "${url_prefix}${name}" +} + +Set-Location - +Write-Output "=> Downloaded to $destination" diff --git a/tools/download.ps1 b/tools/download.ps1 deleted file mode 100644 index 7e784c4..0000000 --- a/tools/download.ps1 +++ /dev/null @@ -1,8 +0,0 @@ -tmp -curl -LO https://github.com/RubyMetric/chsrc/releases/download/preview/chsrc-x64-windows.exe -curl -LO https://github.com/RubyMetric/chsrc/releases/download/preview/chsrc-x86-windows.exe -curl -LO https://github.com/RubyMetric/chsrc/releases/download/preview/chsrc-x64-macos -curl -LO https://github.com/RubyMetric/chsrc/releases/download/preview/chsrc-x64-linux -curl -LO https://github.com/RubyMetric/chsrc/releases/download/preview/chsrc-aarch64-linux -curl -LO https://github.com/RubyMetric/chsrc/releases/download/preview/chsrc-riscv64-linux -curl -LO https://github.com/RubyMetric/chsrc/releases/download/preview/chsrc-armv7-linux