Skip to content

Commit d3f4995

Browse files
thrift install script
1 parent 948814c commit d3f4995

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

scripts/install-thrift-locally.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash -e
2+
3+
cd $(dirname $0)/..
4+
5+
if [[ ! -d .dependencies ]]; then
6+
mkdir .dependencies
7+
fi
8+
9+
cd .dependencies
10+
rm -rf thrift
11+
mkdir thrift
12+
cd thrift
13+
14+
APACHE_THRIFT_VERSION=0.9.3
15+
16+
brew install bison
17+
18+
# macs have an old versiion of bison hanging around typically
19+
# so override it by using the brew version in PATH
20+
export PATH="/opt/homebrew/opt/bison/bin:$PATH"
21+
22+
wget https://archive.apache.org/dist/thrift/${APACHE_THRIFT_VERSION}/thrift-${APACHE_THRIFT_VERSION}.tar.gz && \
23+
24+
tar -xvf thrift-${APACHE_THRIFT_VERSION}.tar.gz
25+
rm thrift-${APACHE_THRIFT_VERSION}.tar.gz
26+
cd thrift-${APACHE_THRIFT_VERSION}/
27+
28+
./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 && \
29+
30+
make
31+
echo ""
32+
echo "thrift expects to be globally installed :/"
33+
echo "asking do do with sudo to install to /usr/local/bin"
34+
echo ""
35+
sudo make install && \
36+
cd .. && \
37+
rm -rf thrift-${APACHE_THRIFT_VERSION}
38+
thrift --version
39+
echo "done"

0 commit comments

Comments
 (0)