Binary handling on MacOS/Ventura
brendan-stephens opened this issue · comments
There's no /usr/local/bin
path, by default, on Ventrua.
And no handling if the path doesn't exist:
printf "\n${ansi_reset}${ansi_info}↯ Adding sshx binary to ${ansi_underline}%s${ansi_reset}\n" "/usr/local/bin"
if [ "$(id -u)" -ne 0 ]; then
sudo tar xf "$temp" -C /usr/local/bin
else
tar xf "$temp" -C /usr/local/bin
fi
↯ Adding sshx binary to /usr/local/bin
tar: could not chdir to '/usr/local/bin'
↯ Done! You can now run sshx.
The target can be added (including PATH
).
Optionally, a brew (or other) package may be helpful here for Mac installs.
Thanks for the report! I didn't realize macOS Ventura doesn't have /usr/local/bin. Do you have suggestions for where to put the binary otherwise?
I could package it with brew
, and I've done that in the past, but it's kind of a pain. :/
Brew would be great, it feels safer to install things with brew than by piping to shell with sudo
Brew now installs binaries to /opt/homebrew/
on my machine FWIW
Fair enough! I previously wrote another CLI tool that was packaged on Homebrew, I think we'll probably just wait a while and see if there's enough interest.
Interest about a brew package for me too!
@ekzhang it could be installed using brew ?