blob: afafaa8f73548bccb6d5efedc3f51dbfdfd20967 [file] [log] [blame]
Louis Ryanc42c8c42015-03-18 16:31:38 -07001#!/bin/bash
2#
3# Build protoc & netty
4set -ev
5
Louis Ryanc42c8c42015-03-18 16:31:38 -07006# Make protoc
Eric Andersona0acb9b2015-03-20 10:26:00 -07007# Can't check for presence of directory as cache auto-creates it.
8if [ -f /tmp/proto3-a2/bin/protoc ]; then
9 echo "Not building protobuf. Already built"
10else
11 wget -O - https://github.com/google/protobuf/archive/v3.0.0-alpha-2.tar.gz | tar xz -C /tmp
12 pushd /tmp/protobuf-3.0.0-alpha-2
13 ./autogen.sh
14 # install here so we don't need sudo
15 ./configure --prefix=/tmp/proto3-a2
16 make -j2
17 make install
18 popd
19fi
Louis Ryanc42c8c42015-03-18 16:31:38 -070020
21# Make and install netty
Eric Andersona0acb9b2015-03-20 10:26:00 -070022pushd lib/netty
23BUILD_NETTY=1
Eric Anderson16055782015-03-20 12:03:48 -070024NETTY_REV_FILE="$HOME/.m2/repository/io/netty/netty-ver"
Eric Andersona0acb9b2015-03-20 10:26:00 -070025REV="$(git rev-parse HEAD)"
26if [ -f "$NETTY_REV_FILE" ]; then
27 REV_LAST="$(cat "$NETTY_REV_FILE")"
28 if [ z"$REV" = z"$REV_LAST" ]; then
29 BUILD_NETTY=0
30 echo "Not building Netty; already at $REV"
31 fi
32fi
33if [ $BUILD_NETTY = 1 ]; then
34 mvn install -pl codec-http2 -am -DskipTests=true
35 echo "$REV" > "$NETTY_REV_FILE"
36fi
37popd