Skip to content

Commit

Permalink
install.sh: If running under Rosetta, switch to ARM64 mode
Browse files Browse the repository at this point in the history
`bless` tries to do the Intel thing if run under Rosetta... go figure
:-)

Signed-off-by: Hector Martin <marcan@marcan.st>
  • Loading branch information
marcan committed Mar 20, 2022
1 parent c785fa3 commit 3738ea1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,14 @@ python=Frameworks/Python.framework/Versions/3.9/bin/python3.9
export SSL_CERT_FILE=$PWD/Frameworks/Python.framework/Versions/Current/etc/openssl/cert.pem
export PATH="$PWD/bin:$PATH"

arch=

if [ $(arch) != "arm64" ]; then
echo
echo "You're running the installer in Intel mode under Rosetta!"
echo "Don't worry, we can fix that for you. Switching to ARM64 mode..."
arch="arch -arm64"
fi

exec </dev/tty >/dev/tty 2>/dev/tty
exec $python main.py "$@"
exec $arch $python main.py "$@"

0 comments on commit 3738ea1

Please sign in to comment.