#!/bin/sh
rm -rf logstash-forwarder
mkdir logstash-forwarder
export GOPATH=`pwd`/logstash-forwarder
go get -v -d github.com/elastic/logstash-forwarder/...
( cd $GOPATH/src/github.com/elastic
  go get -v -d -u ./...
)
tar cf - --exclude .git logstash-forwarder | xz -9 >logstash-forwarder-`date '+%Y%m%d'`.tar.xz
