summaryrefslogtreecommitdiffstats
path: root/makeself
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2018-01-13 03:13:36 +0200
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2018-01-13 03:13:36 +0200
commit2d7bd09fb6f064978aa01415701f7c5ed35ca5d3 (patch)
tree683df98b6266fd550924964de7d9c321b561db62 /makeself
parent5aabeec377b0c16d59a00a805a18c5897f6ecc5c (diff)
detect the number of processors on freebsd
Diffstat (limited to 'makeself')
-rwxr-xr-xmakeself/functions.sh21
-rwxr-xr-xmakeself/jobs/50-bash-4.4.install.sh2
-rwxr-xr-xmakeself/jobs/50-curl-7.53.1.install.sh2
-rwxr-xr-xmakeself/jobs/50-fping-4.0.install.sh2
4 files changed, 14 insertions, 13 deletions
diff --git a/makeself/functions.sh b/makeself/functions.sh
index a72a1f4110..839fc3226c 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}"
diff --git a/makeself/jobs/50-bash-4.4.install.sh b/makeself/jobs/50-bash-4.4.install.sh
index 8019cefb7b..7868a1e76f 100755
--- a/makeself/jobs/50-bash-4.4.install.sh
+++ b/makeself/jobs/50-bash-4.4.install.sh
@@ -34,7 +34,7 @@ run ./configure \
run make clean
-run make -j${PROCESSORS}
+run make -j${SYSTEM_CPUS}
cat >examples/loadables/Makefile <<EOF
all:
diff --git a/makeself/jobs/50-curl-7.53.1.install.sh b/makeself/jobs/50-curl-7.53.1.install.sh
index 038fb2ac9f..ea80f0d2cf 100755
--- a/makeself/jobs/50-curl-7.53.1.install.sh
+++ b/makeself/jobs/50-curl-7.53.1.install.sh
@@ -24,7 +24,7 @@ run ./configure \
run sed -i -e "s/curl_LDFLAGS =/curl_LDFLAGS = -all-static/" src/Makefile
run make clean
-run make -j${PROCESSORS}
+run make -j${SYSTEM_CPUS}
run make install
if [ ${NETDATA_BUILD_WITH_DEBUG} -eq 0 ]
diff --git a/makeself/jobs/50-fping-4.0.install.sh b/makeself/jobs/50-fping-4.0.install.sh
index ce6cb270e3..2e22ebf8d4 100755
--- a/makeself/jobs/50-fping-4.0.install.sh
+++ b/makeself/jobs/50-fping-4.0.install.sh
@@ -19,7 +19,7 @@ install:
EOF
run make clean
-run make -j${PROCESSORS}
+run make -j${SYSTEM_CPUS}
run make install
if [ ${NETDATA_BUILD_WITH_DEBUG} -eq 0 ]