summaryrefslogtreecommitdiffstats
path: root/makeself/run-all-jobs.sh
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2017-07-27 09:55:47 +0000
committerLennart Weller <lhw@ring0.de>2017-07-27 09:55:47 +0000
commita133c9c3b637b1dbe7b5b053f7e2572c1950cead (patch)
tree2207939a88e96bca329457f40a9d9d18ab659dc1 /makeself/run-all-jobs.sh
parentNew upstream version 1.6.0+dfsg (diff)
downloadnetdata-a133c9c3b637b1dbe7b5b053f7e2572c1950cead.tar.xz
netdata-a133c9c3b637b1dbe7b5b053f7e2572c1950cead.zip
New upstream version 1.7.0+dfsgupstream/1.7.0+dfsg
Diffstat (limited to 'makeself/run-all-jobs.sh')
-rwxr-xr-xmakeself/run-all-jobs.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/makeself/run-all-jobs.sh b/makeself/run-all-jobs.sh
new file mode 100755
index 000000000..b08fa9187
--- /dev/null
+++ b/makeself/run-all-jobs.sh
@@ -0,0 +1,46 @@
+#!/usr/bin/env bash
+
+LC_ALL=C
+umask 002
+
+# be nice
+renice 19 $$ >/dev/null 2>/dev/null
+
+# -----------------------------------------------------------------------------
+# prepare the environment for the jobs
+
+# installation directory
+export NETDATA_INSTALL_PATH="${1-/opt/netdata}"
+
+# our source directory
+export NETDATA_MAKESELF_PATH="$(dirname "${0}")"
+if [ "${NETDATA_MAKESELF_PATH:0:1}" != "/" ]
+ then
+ export NETDATA_MAKESELF_PATH="$(pwd)/${NETDATA_MAKESELF_PATH}"
+fi
+
+# netdata source directory
+export NETDATA_SOURCE_PATH="${NETDATA_MAKESELF_PATH}/.."
+
+# number of processors this system has
+PROCESSORS=$(cat /proc/cpuinfo 2>/dev/null | grep ^processor | wc -l)
+[ -z "${PROCESSORS}" -o $(( PROCESSORS )) -lt 1 ] && PROCESSORS=1
+export PROCESSORS
+
+# make sure ${NULL} is empty
+export NULL=
+
+# -----------------------------------------------------------------------------
+
+cd "${NETDATA_MAKESELF_PATH}" || exit 1
+
+. ./functions.sh "${@}" || exit 1
+
+for x in jobs/*.install.sh
+do
+ progress "running ${x}"
+ "${x}" "${NETDATA_INSTALL_PATH}"
+done
+
+echo >&2 "All jobs for static packaging done successfully."
+exit 0 \ No newline at end of file