Skip to content

Commit

Permalink
Allow installation of arm64 binaries in darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
svishwanath-tw committed Aug 9, 2021
1 parent fb2cb51 commit 5a4e82d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions global_install_scripts/install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,18 @@ function run() {

function set_talisman_binary_name() {
# based on OS (linux/darwin) and ARCH(32/64 bit)
declare OS
OS=$(operating_system)
declare SUFFIX
SUFFIX=$(operating_system)
ARCH=$(uname -m)
case $ARCH in
"x86_64")
OS="${OS}_amd64"
SUFFIX="${SUFFIX}_amd64"
;;
"i686" | "i386")
OS="${OS}_386"
SUFFIX="${SUFFIX}_386"
;;
"arm64")
SUFFIX="${SUFFIX}_arm64"
;;
*)
echo_error "Talisman currently only supports x86 and x86_64 architectures."
Expand All @@ -120,7 +123,7 @@ function run() {
;;
esac

TALISMAN_BINARY_NAME="talisman_${OS}"
TALISMAN_BINARY_NAME="talisman_${SUFFIX}"
if [[ $OS == *"windows"* ]]; then
TALISMAN_BINARY_NAME="${TALISMAN_BINARY_NAME}.exe"
fi
Expand Down

0 comments on commit 5a4e82d

Please sign in to comment.