summaryrefslogtreecommitdiffstats
path: root/makeself/functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'makeself/functions.sh')
-rwxr-xr-xmakeself/functions.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/makeself/functions.sh b/makeself/functions.sh
index 48835f0f5..a72a1f411 100755
--- a/makeself/functions.sh
+++ b/makeself/functions.sh
@@ -3,11 +3,12 @@
# -----------------------------------------------------------------------------
# allow running the jobs by hand
+[ -z "${NETDATA_BUILD_WITH_DEBUG}" ] && export NETDATA_BUILD_WITH_DEBUG=0
[ -z "${NETDATA_INSTALL_PATH}" ] && export NETDATA_INSTALL_PATH="${1-/opt/netdata}"
[ -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=$(cat /proc/cpuinfo 2>/dev/null | grep ^processor | wc -l)
+[ -z "${PROCESSORS}" ] && export PROCESSORS=$(grep -c ^processor /proc/cpuinfo)
[ -z "${PROCESSORS}" -o $((PROCESSORS)) -lt 1 ] && export PROCESSORS=1
export NULL=