summaryrefslogtreecommitdiffstats
path: root/packaging/makeself/build.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2019-09-13 05:05:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2019-09-13 05:05:25 +0000
commitd72015c7962af72903326a01fb114f8f2d37eebc (patch)
tree5bb5ae6928f3f2a92f478f69c2f5c9aa9333fbf8 /packaging/makeself/build.sh
parentReleasing debian version 1.17.0-3. (diff)
downloadnetdata-d72015c7962af72903326a01fb114f8f2d37eebc.tar.xz
netdata-d72015c7962af72903326a01fb114f8f2d37eebc.zip
Merging upstream version 1.17.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'packaging/makeself/build.sh')
-rwxr-xr-xpackaging/makeself/build.sh61
1 files changed, 61 insertions, 0 deletions
diff --git a/packaging/makeself/build.sh b/packaging/makeself/build.sh
new file mode 100755
index 000000000..e5804c523
--- /dev/null
+++ b/packaging/makeself/build.sh
@@ -0,0 +1,61 @@
+#!/usr/bin/env sh
+# SPDX-License-Identifier: GPL-3.0-or-later
+
+# -----------------------------------------------------------------------------
+# parse command line arguments
+
+export NETDATA_BUILD_WITH_DEBUG=0
+
+while [ ! -z "${1}" ]
+do
+ case "${1}" in
+ debug)
+ export NETDATA_BUILD_WITH_DEBUG=1
+ ;;
+
+ *)
+ ;;
+ esac
+
+ shift
+done
+
+
+# -----------------------------------------------------------------------------
+
+# First run install-alpine-packages.sh under alpine linux to install
+# the required packages. build-x86_64-static.sh will do this for you
+# using docker.
+
+cd $(dirname "$0") || exit 1
+
+# if we don't run inside the netdata repo
+# download it and run from it
+if [ ! -f ../../netdata-installer.sh ]
+then
+ git clone https://github.com/netdata/netdata.git netdata.git || exit 1
+ cd netdata.git/makeself || exit 1
+ ./build.sh "$@"
+ exit $?
+fi
+
+cat >&2 <<EOF
+
+This program will create a self-extracting shell package containing
+a statically linked netdata, able to run on any 64bit Linux system,
+without any dependencies from the target system.
+
+It can be used to have netdata running in no-time, or in cases the
+target Linux system cannot compile netdata.
+
+EOF
+
+# read -p "Press ENTER to continue > "
+
+if [ ! -d tmp ]
+ then
+ mkdir tmp || exit 1
+fi
+
+./run-all-jobs.sh "$@"
+exit $?