diff options
author | Christian Poessinger <christian@poessinger.com> | 2022-07-09 10:45:58 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2022-07-09 11:09:39 +0200 |
commit | 707fe34493e4f89a7aa310101f1bc2f2fbf7ec10 (patch) | |
tree | afd8745bd0e0fd4a161fef4693f34e2f584bf454 /packages/telegraf/build.sh | |
parent | 9502f7aa3b991ef1597585492587b13ba18751bd (diff) | |
download | vyos-build-707fe34493e4f89a7aa310101f1bc2f2fbf7ec10.tar.gz vyos-build-707fe34493e4f89a7aa310101f1bc2f2fbf7ec10.zip |
telegraf: T4515: add custom build
Diffstat (limited to 'packages/telegraf/build.sh')
-rwxr-xr-x | packages/telegraf/build.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/telegraf/build.sh b/packages/telegraf/build.sh new file mode 100755 index 00000000..77712412 --- /dev/null +++ b/packages/telegraf/build.sh @@ -0,0 +1,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 |