summaryrefslogtreecommitdiffstats
path: root/makeself/functions.sh
diff options
context:
space:
mode:
authorFederico Ceratto <federico.ceratto@gmail.com>2018-03-27 21:28:21 +0000
committerFederico Ceratto <federico.ceratto@gmail.com>2018-03-27 21:28:21 +0000
commitd4dd00f58a502c9ca4b63e36ce6bc7a9945dc63c (patch)
treefaac99f51f182bb8c0a03e95e393d421ac9ddf42 /makeself/functions.sh
parentNew upstream version 1.9.0+dfsg (diff)
downloadnetdata-d4dd00f58a502c9ca4b63e36ce6bc7a9945dc63c.tar.xz
netdata-d4dd00f58a502c9ca4b63e36ce6bc7a9945dc63c.zip
New upstream version 1.10.0+dfsgupstream/1.10.0+dfsg
Diffstat (limited to 'makeself/functions.sh')
-rwxr-xr-xmakeself/functions.sh21
1 files changed, 11 insertions, 10 deletions
diff --git a/makeself/functions.sh b/makeself/functions.sh
index a72a1f411..839fc3226 100755
--- a/makeself/functions.sh
+++ b/makeself/functions.sh
@@ -8,8 +8,6 @@
[ -z "${NETDATA_MAKESELF_PATH}" ] && export NETDATA_MAKESELF_PATH="$(dirname "${0}")/.."
[ "${NETDATA_MAKESELF_PATH:0:1}" != "/" ] && export NETDATA_MAKESELF_PATH="$(pwd)/${NETDATA_MAKESELF_PATH}"
[ -z "${NETDATA_SOURCE_PATH}" ] && export NETDATA_SOURCE_PATH="${NETDATA_MAKESELF_PATH}/.."
-[ -z "${PROCESSORS}" ] && export PROCESSORS=$(grep -c ^processor /proc/cpuinfo)
-[ -z "${PROCESSORS}" -o $((PROCESSORS)) -lt 1 ] && export PROCESSORS=1
export NULL=
# make sure the path does not end with /
@@ -21,14 +19,7 @@ fi
# find the parent directory
export NETDATA_INSTALL_PARENT="$(dirname "${NETDATA_INSTALL_PATH}")"
-
-# debug
-echo "ME=${0}"
-echo "NETDATA_INSTALL_PARENT=${NETDATA_INSTALL_PARENT}"
-echo "NETDATA_INSTALL_PATH=${NETDATA_INSTALL_PATH}"
-echo "NETDATA_MAKESELF_PATH=${NETDATA_MAKESELF_PATH}"
-echo "NETDATA_SOURCE_PATH=${NETDATA_SOURCE_PATH}"
-echo "PROCESSORS=${PROCESSORS}"
+# -----------------------------------------------------------------------------
# bash strict mode
set -euo pipefail
@@ -58,3 +49,13 @@ fetch() {
# load the functions of the netdata-installer.sh
. "${NETDATA_SOURCE_PATH}/installer/functions.sh"
+
+# -----------------------------------------------------------------------------
+
+# debug
+echo "ME=${0}"
+echo "NETDATA_INSTALL_PARENT=${NETDATA_INSTALL_PARENT}"
+echo "NETDATA_INSTALL_PATH=${NETDATA_INSTALL_PATH}"
+echo "NETDATA_MAKESELF_PATH=${NETDATA_MAKESELF_PATH}"
+echo "NETDATA_SOURCE_PATH=${NETDATA_SOURCE_PATH}"
+echo "PROCESSORS=${SYSTEM_CPUS}"