Last active
February 11, 2025 07:27
-
-
Save neuralpain/65f269b7e0381a863e1795763d6e712c to your computer and use it in GitHub Desktop.
Install sendme on Windows.
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 INSTALL SCRIPT FOR LINUX/MACOS | |
#!/bin/sh | |
# Copyright 2023 n0. All rights reserved. Dual MIT/Apache license. | |
set -e | |
repo="n0-computer/sendme" | |
release_url="https://api.github.com/repos/$repo/releases/latest" | |
if [ "$OS" = "Windows_NT" ]; then | |
echo "Error: this installer only works on linux & macOS." 1>&2 | |
exit 1 | |
else | |
case $(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" ;; | |
esac | |
fi | |
echo "Downloading $repo for $target" | |
release_target_url=$( | |
curl -s "$release_url" | | |
grep "browser_download_url" | | |
grep "$target" | | |
sed -re 's/.*: "([^"]+)".*/\1/' \ | |
) | |
curl -sL "$release_target_url" | tar xz | |
#> | |
# designed to be a one-liner | |
# installs in C:\Windows for PATH access | |
# copy the one-liner and run in an elevated powershell terminal | |
# use command "sendme" to use the program | |
iwr -Uri ($(irm -Uri "https://api.github.com/repos/n0-computer/sendme/releases/latest").assets | where {$_.name -like "*windows-x86_64*"} | Select-Object -ExpandProperty browser_download_url) -OutFile "$env:TEMP\sendme.zip"; Expand-Archive -Path "$env:TEMP\sendme.zip" -DestinationPath "C:\Windows\" -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment