install.sh m1 macos

This commit is contained in:
veeso
2022-03-15 11:14:54 +01:00
committed by Christian Visintin
parent 572a948f2c
commit 31203d76ce

View File

@@ -266,13 +266,19 @@ install_on_linux() {
install_on_macos() {
if has brew; then
# get homebrew formula name
if [ "${ARCH}" != "x86_64" ]; then
FORMULA="termscp"
else
FORMULA="termscp-m1"
fi
if has termscp; then
info "Upgrading ${GREEN}termscp${NO_COLOR}"
# The OR is used since someone could have installed via cargo previously
brew update && brew upgrade termscp || brew install veeso/termscp/termscp
brew update && brew upgrade ${FORMULA} || brew install veeso/termscp/${FORMULA}
else
info "Installing ${GREEN}termscp${NO_COLOR}"
brew install veeso/termscp/termscp
brew install veeso/termscp/${FORMULA}
fi
else
try_with_cargo "brew is missing on your system; please install it from <https://brew.sh/>"