Skip to content

Commit

Permalink
Fix #67: Add support for installing on Apple Silicon with Rosetta
Browse files Browse the repository at this point in the history
  • Loading branch information
stennie committed Nov 19, 2021
1 parent 1935f3b commit 48f3db2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions bin/m
Original file line number Diff line number Diff line change
Expand Up @@ -640,10 +640,10 @@ prompt_install() {
if [[ "$CONFIRM" == 1 ]]; then
echo $1
while true; do
read -p "Installation may take a while. Would you like to proceed? [Y/n] " yn
read -p "Installation may take a while. Would you like to proceed? [y/N] " yn
case $yn in
[Nn]* ) echo "Aborted."; exit ;;
* ) break;;
[Yy]* ) break ;;
* ) echo "Aborted."; exit ;;
esac
done
fi
Expand Down Expand Up @@ -773,7 +773,7 @@ install_bin() {
# Set the os, distro, and arch variables for the current machine.
#

get_distro_and_arch () {
get_distro_and_arch() {
arch=`uname -m`
local OS=`uname`
os=`echo $OS | tr '[:upper:]' '[:lower:]'`
Expand All @@ -783,6 +783,11 @@ get_distro_and_arch () {
os=linux ;;
darwin* )
os=osx
if [ "$arch" = "arm64" ]; then
log "NOTE: Apple Silicon is not natively supported for MongoDB server yet"
log " ==> Changing arch from arm64 to x86_64"
arch="x86_64"
fi
if [ $(numeric_version $version) -ge $(numeric_version "4.1.1") ]; then
# https://jira.mongodb.org/browse/SERVER-35211
sslbuild="macos"
Expand Down

0 comments on commit 48f3db2

Please sign in to comment.