-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
30 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<# | ||
@@ ==================================================== | ||
@@ Installs/Updates version-manager(vmr) for Windows | ||
@@ ==================================================== | ||
@@ Copyright (c) 2024 [email protected] | ||
@@ | ||
@@ Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
|
@@ -29,12 +32,15 @@ if ( "$sysType" -match "arm" ) | |
$arch="arm64" | ||
} | ||
|
||
$version="v0.6.2" | ||
# $version="v0.6.2" | ||
|
||
$filename="vmr_windows-" + $arch + ".zip" | ||
$download_url="https://proxy.vmr.us.kg/proxy/https://github.com/gvcgo/version-manager/releases/download/" | ||
# $filename="vmr_windows-" + $arch + ".zip" | ||
# $download_url="https://proxy.vmr.us.kg/proxy/https://github.com/gvcgo/version-manager/releases/download/" | ||
|
||
# $url=$download_url + $version + "/" + $filename | ||
|
||
$url=$download_url + $version + "/" + $filename | ||
$url="https://packages.vmr.us.kg/windows/" + $arch | ||
$filename="vmr_windows-" + $arch + ".zip" | ||
|
||
Write-Host "Downloading files..." | ||
|
||
|
@@ -51,4 +57,4 @@ if ( $TRUE_FALSE -eq "True" ) | |
remove-Item -Recurse -Force .\vmr.exe | ||
} | ||
remove-Item -Recurse -Force $filename | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/sh | ||
# ==================================================== | ||
# Installs/Updates version-manager(vm) for MacOS/Linux | ||
# Installs/Updates version-manager(vmr) for MacOS/Linux | ||
# ==================================================== | ||
# Copyright (c) 2024 [email protected] | ||
# | ||
|
@@ -44,9 +44,22 @@ main() { | |
local os_type="$(uname -s)" | ||
local os_arch="$(uname -m)" | ||
|
||
local version="v0.6.2" | ||
|
||
local download_url="https://proxy.vmr.us.kg/proxy/https://github.com/gvcgo/version-manager/releases/download/" | ||
# local version="v0.6.2" | ||
# local download_url="https://proxy.vmr.us.kg/proxy/https://github.com/gvcgo/version-manager/releases/download/" | ||
# local osType="linux" | ||
# if [ "$os_type" = "Darwin" ]; then | ||
# osType="darwin" | ||
# fi | ||
|
||
# local osArch="amd64" | ||
|
||
# if [ "$os_arch" = "arm64" ] || [ "$os_type" = "aarch64" ]; then | ||
# osArch="arm64" | ||
# fi | ||
|
||
# local filename="vmr_$osType-$osArch.zip" | ||
# local url="$download_url$version/$filename" | ||
|
||
local osType="linux" | ||
if [ "$os_type" = "Darwin" ]; then | ||
osType="darwin" | ||
|
@@ -57,9 +70,9 @@ main() { | |
if [ "$os_arch" = "arm64" ] || [ "$os_type" = "aarch64" ]; then | ||
osArch="arm64" | ||
fi | ||
|
||
local url="https://packages.vmr.us.kg/$osType/$osArch" | ||
local filename="vmr_$osType-$osArch.zip" | ||
local url="$download_url$version/$filename" | ||
|
||
echo "$url" | ||
need_cmd "curl" | ||
need_cmd "unzip" | ||
|