summaryrefslogtreecommitdiff
path: root/packages/telegraf/build.sh
blob: 77712412489fac918092519e8b6ee91ef9ce4af7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
CWD=$(pwd)
set -e

SRC=telegraf
if [ ! -d ${SRC} ]; then
    echo "Source directory does not exists, please 'git clone'"
    exit 1
fi

PLUGIN_DIR=${CWD}/plugins

echo "I: Selecting Input plugins"
cp ${PLUGIN_DIR}/inputs/all/all.go ${SRC}/plugins/inputs/all/all.go

echo "I: Selecting Output plugins"
cp ${PLUGIN_DIR}/outputs/all/all.go ${SRC}/plugins/outputs/all/all.go

echo "I: Build Debian amd64 package"
cd ${SRC}
export PATH=/opt/go/bin:$PATH
LDFLAGS=-w make amd64.deb