Skip to content

Commit

Permalink
Merge pull request #394 from coveooss/fix/arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
jebeaudet authored Apr 14, 2023
2 parents d0ea07a + 6675b4f commit 5f825fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions get-latest-tgf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@ install_latest_tgf () {
curl -sL "https://github.com/coveooss/tgf/releases/download/v${TGF_LATEST_VERSION}/tgf_${TGF_LATEST_VERSION}_linux_64-bits.zip" | gzip -d > ${TGF} && chmod +x ${TGF} && script_end
elif [[ $(uname -s) == Darwin ]]
then
echo 'Installing latest tgf for OSX in' $TGF_PATH '...'
curl -sL "https://github.com/coveooss/tgf/releases/download/v${TGF_LATEST_VERSION}/tgf_${TGF_LATEST_VERSION}_macOS_64-bits.zip" | bsdtar -xf- -C ${TGF_PATH} && chmod +x ${TGF} && script_end
OSX_ARCH=$(uname -m)
echo 'Installing latest tgf for OSX with arch '$OSX_ARCH' in' $TGF_PATH '...'
DOWNLOAD_URL=$([ "$OSX_ARCH" == "arm64" ] && echo "https://github.com/coveooss/tgf/releases/download/v${TGF_LATEST_VERSION}/tgf_${TGF_LATEST_VERSION}_macOS_arm64.zip" || echo "https://github.com/coveooss/tgf/releases/download/v${TGF_LATEST_VERSION}/tgf_${TGF_LATEST_VERSION}_macOS_64-bits.zip")
curl -sL $DOWNLOAD_URL | bsdtar -xf- -C ${TGF_PATH} && chmod +x ${TGF} && script_end
else
echo 'OS not supported.'
exit 1
Expand Down

0 comments on commit 5f825fc

Please sign in to comment.