From d3f4995104ad558db3e3b8a3165e153286747dc7 Mon Sep 17 00:00:00 2001 From: David Porter Date: Mon, 4 Nov 2024 12:44:43 -0800 Subject: [PATCH] thrift install script --- scripts/install-thrift-locally.sh | 39 +++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 scripts/install-thrift-locally.sh diff --git a/scripts/install-thrift-locally.sh b/scripts/install-thrift-locally.sh new file mode 100755 index 000000000..3b89a2624 --- /dev/null +++ b/scripts/install-thrift-locally.sh @@ -0,0 +1,39 @@ +#!/bin/bash -e + +cd $(dirname $0)/.. + +if [[ ! -d .dependencies ]]; then + mkdir .dependencies +fi + +cd .dependencies +rm -rf thrift +mkdir thrift +cd thrift + +APACHE_THRIFT_VERSION=0.9.3 + +brew install bison + +# macs have an old versiion of bison hanging around typically +# so override it by using the brew version in PATH +export PATH="/opt/homebrew/opt/bison/bin:$PATH" + +wget https://archive.apache.org/dist/thrift/${APACHE_THRIFT_VERSION}/thrift-${APACHE_THRIFT_VERSION}.tar.gz && \ + +tar -xvf thrift-${APACHE_THRIFT_VERSION}.tar.gz +rm thrift-${APACHE_THRIFT_VERSION}.tar.gz +cd thrift-${APACHE_THRIFT_VERSION}/ + +./configure --enable-libs=no --enable-tests=no --enable-tutorial=no --with-cpp=no --with-c_glib=no --with-java=yes --with-ruby=no --with-erlang=no --with-go=no --with-nodejs=no --with-python=no && \ + +make +echo "" +echo "thrift expects to be globally installed :/" +echo "asking do do with sudo to install to /usr/local/bin" +echo "" +sudo make install && \ +cd .. && \ +rm -rf thrift-${APACHE_THRIFT_VERSION} +thrift --version +echo "done"