From ccdd0535046298c1d1c0b42c9d59de0a7c90b3a8 Mon Sep 17 00:00:00 2001 From: Anshul Gada <80207612+Anshulgada@users.noreply.github.com> Date: Sat, 22 Feb 2025 01:16:22 +0530 Subject: [PATCH 1/3] Create install-sendme.ps1 --- install-sendme.ps1 | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 install-sendme.ps1 diff --git a/install-sendme.ps1 b/install-sendme.ps1 new file mode 100644 index 0000000..f401f21 --- /dev/null +++ b/install-sendme.ps1 @@ -0,0 +1,35 @@ +$repo = "n0-computer/sendme" +$release_url = "https://api.github.com/repos/$repo/releases/latest" + +$target = "windows-x86_64" +$zipFile = "sendme.zip" +$extractPath = ".\sendme" + +Write-Host "Fetching latest release for $target..." +$releaseJson = Invoke-RestMethod -Uri $release_url +$releaseUrl = ($releaseJson.assets | Where-Object { $_.browser_download_url -match $target }).browser_download_url + +if (-not $releaseUrl) { + Write-Host "Error: No release found for $target" -ForegroundColor Red + exit 1 +} + +Write-Host "Downloading from $releaseUrl..." +Invoke-WebRequest -Uri $releaseUrl -OutFile $zipFile + +Write-Host "Extracting..." +Expand-Archive -Path $zipFile -DestinationPath $extractPath -Force + +Write-Host "Cleaning up..." +Remove-Item -Force $zipFile + +Write-Host "Installation complete!" + +# Add the 'sendme' folder to PATH +$sendmePath = (Resolve-Path $extractPath).Path + +# Add the folder to the PATH permanently (user level) +$env:Path += ";$sendmePath" +[System.Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User) + +Write-Host "'$sendmePath' has been permanently added to user PATH." -ForegroundColor Green From 8c259de6eb6302af3487bdc745f07df10b181a23 Mon Sep 17 00:00:00 2001 From: Anshul Gada <80207612+Anshulgada@users.noreply.github.com> Date: Sat, 22 Feb 2025 01:18:30 +0530 Subject: [PATCH 2/3] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 307f934..8fceb3a 100644 --- a/README.md +++ b/README.md @@ -18,10 +18,16 @@ TLS. # Installation +## For Linux/MacOS ``` cargo install sendme ``` +## For windows (Run in Powershell) +``` +iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/n0-computer/sendme/main/install-sendme.ps1')) +``` + # Usage ## Send side From c196432abfb0f4b051b72f3dd0bac19dbbffe260 Mon Sep 17 00:00:00 2001 From: Anshul Gada <80207612+Anshulgada@users.noreply.github.com> Date: Wed, 12 Mar 2025 19:06:03 +0530 Subject: [PATCH 3/3] Update: Addressed PR review changes --- README.md | 11 ++++++++--- install-sendme.ps1 | 3 +-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8fceb3a..46c2341 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,19 @@ TLS. # Installation -## For Linux/MacOS +## Build from Source ``` cargo install sendme ``` -## For windows (Run in Powershell) +## For Linux/MacOS +``` +curl -fsSL https://iroh.computer/sendme.sh | sh +``` + +## For Windows (Run in Powershell) ``` -iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/n0-computer/sendme/main/install-sendme.ps1')) +iwr https://iroh.computer/sendme.ps1 -useb | iex ``` # Usage diff --git a/install-sendme.ps1 b/install-sendme.ps1 index f401f21..b40d09c 100644 --- a/install-sendme.ps1 +++ b/install-sendme.ps1 @@ -1,5 +1,4 @@ -$repo = "n0-computer/sendme" -$release_url = "https://api.github.com/repos/$repo/releases/latest" +$release_url = "https://api.github.com/repos/n0-computer/sendme/releases/latest" $target = "windows-x86_64" $zipFile = "sendme.zip"