You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wasn't satisfied with the one-liner PowerShell code I shared in issue #84, so I attempted to update the main install script at iroh.computer/sendme.sh. The code below is the proposed update which was tested using Git Bash (MINGW64). Another test can be done before officially updating.
#!/bin/sh# Copyright 2023 n0. All rights reserved. Dual MIT/Apache license.# Windows support provided by neuralpain.set -e
repo="n0-computer/sendme"
release_url="https://api.github.com/repos/$repo/releases/latest"if [ "$OS"="Windows_NT" ];then
target="windows-x86_64"elsecase$(uname -sm)in"Darwin x86_64") target="darwin-x86_64" ;;
"Darwin arm64") target="darwin-aarch64" ;;
"Linux x86_64") target="linux-x86_64" ;;
"Linux arm64" | "Linux aarch64") target="linux-aarch64" ;;
*) target="linux-x86_64" ;;
esacfiecho"Downloading $repo for $target"
release_target_url=$( curl -s "$release_url"| grep "browser_download_url"| grep "$target"| sed -re 's/.*: "([^"]+)".*/\1/')if [[ "$release_target_url"=~\.zip$ ]];then
release_name=$( curl -s "$release_url"| grep "name"| grep "$target"| sed -re 's/.*: "([^"]+)".*/\1/')
curl -sL "$release_target_url" -O | unzip -oq $release_nameelse
curl -sL "$release_target_url"| tar xz
fi
The text was updated successfully, but these errors were encountered:
I wasn't satisfied with the one-liner PowerShell code I shared...
This does not mean that the PowerShell code is obsolete. Not every Windows OS is set up with a Unix-like shell environment by default; and for that reason the PowerShell one-liner would be the preferred method of installation. However, I'd like to think of this as added versatility for the more capable power users out there.
if [[ "$release_target_url" =~ \.zip$ ]]
Since the Windows release is the only package which uses a .zip extension, this shouldn't cause any issues during installation.
I wasn't satisfied with the one-liner PowerShell code I shared in issue #84, so I attempted to update the main install script at iroh.computer/sendme.sh. The code below is the proposed update which was tested using Git Bash (MINGW64). Another test can be done before officially updating.
The text was updated successfully, but these errors were encountered: