From 8366b927f5c37f1c97f0a110a2837af3ba019aa4 Mon Sep 17 00:00:00 2001 From: bokwoon Date: Mon, 29 Apr 2024 22:23:04 +0800 Subject: [PATCH] document on how to download release executables --- README.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/README.md b/README.md index 9e98948..3f05b80 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,50 @@ ## Installation +**Go** + ```shell go install github.com/bokwoon95/wgo@latest + +``` +**Linux** + +```shell +# Intel/AMD +curl -L -o wgo "$(curl -s 'https://api.github.com/repos/bokwoon95/wgo/releases/latest' | grep '\s*"browser_download_url":\s*".*wgo-linux"' | sed 's/^\s*"browser_download_url": "\|"$//g')" +chmod +x ./wgo +sudo mv ./wgo /usr/local/bin +``` + +```shell +# ARM +curl -L -o wgo "$(curl -s 'https://api.github.com/repos/bokwoon95/wgo/releases/latest' | grep '\s*"browser_download_url":\s*".*wgo-linux-arm"' | sed 's/^\s*"browser_download_url": "\|"$//g')" +chmod +x ./wgo +sudo mv ./wgo /usr/local/bin +``` + +**macOS** + +```shell +# Intel/AMD +curl -L -o wgo "$(curl -s 'https://api.github.com/repos/bokwoon95/wgo/releases/latest' | grep '\s*"browser_download_url":\s*".*wgo-linux"' | sed 's/^\s*"browser_download_url": "\|"$//g')" +chmod +x ./wgo +sudo mv ./wgo /usr/local/bin +``` + +```shell +# Apple Silicon +curl -L -o wgo "$(curl -s 'https://api.github.com/repos/bokwoon95/wgo/releases/latest' | grep '\s*"browser_download_url":\s*".*wgo-linux-apple-silicon"' | sed 's/^\s*"browser_download_url": "\|"$//g')" +chmod +x ./wgo +sudo mv ./wgo /usr/local/bin +``` + +**Windows** + +NOTE: This only downloads the wgo.exe executable, you must move it into PATH yourself. + +```powershell +Invoke-WebRequest -Uri $($(Invoke-RestMethod -Uri 'https://api.github.com/repos/bokwoon95/wgo/releases/latest').assets | Where-Object { $_.name -eq 'wgo-windows.exe' }).browser_download_url -OutFile wgo.exe ``` ```text