install.sh m1 macos

This commit is contained in:
veeso
2022-03-15 11:25:50 +01:00
committed by Christian Visintin
parent 572a948f2c
commit 31203d76ce
+8 -2
View File
@@ -266,13 +266,19 @@ install_on_linux() {
install_on_macos() { install_on_macos() {
if has brew; then if has brew; then
# get homebrew formula name
if [ "${ARCH}" != "x86_64" ]; then
FORMULA="termscp"
else
FORMULA="termscp-m1"
fi
if has termscp; then if has termscp; then
info "Upgrading ${GREEN}termscp${NO_COLOR}…" info "Upgrading ${GREEN}termscp${NO_COLOR}…"
# The OR is used since someone could have installed via cargo previously # 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 else
info "Installing ${GREEN}termscp${NO_COLOR}…" info "Installing ${GREEN}termscp${NO_COLOR}…"
brew install veeso/termscp/termscp brew install veeso/termscp/${FORMULA}
fi fi
else else
try_with_cargo "brew is missing on your system; please install it from <https://brew.sh/>" try_with_cargo "brew is missing on your system; please install it from <https://brew.sh/>"