convert relative paths to absolute
Costa Tsaousis (ktsaou) committed
Mar 27, 2017 at 01:15 UTC
547fd9f2b85a2591322cd93d641dd3b2948a4a1f
1 file changed
+14
makeself/run-all-jobs.sh
+14
@@ -6,11 +6,23 @@ umask 002
6
# be nice
7
renice 19 $$ >/dev/null 2>/dev/null
8
9
+# -----------------------------------------------------------------------------
10
# prepare the environment for the jobs
11
+
12
+# installation directory
13
export NETDATA_INSTALL_PATH="${1-/opt/netdata}"
14
+
15
+# our source directory
16
export NETDATA_MAKESELF_PATH="$(dirname "${0}")"
17
+if [ "${NETDATA_MAKESELF_PATH:0:1}" != "/" ]
18
+ then
19
+ export NETDATA_MAKESELF_PATH="$(pwd)/${NETDATA_MAKESELF_PATH}"
20
+fi
21
+
22
+# netdata source directory
23
export NETDATA_SOURCE_PATH="${NETDATA_MAKESELF_PATH}/.."
24
25
+# number of processors this system has
26
PROCESSORS=$(cat /proc/cpuinfo 2>/dev/null | grep ^processor | wc -l)
27
[ -z "${PROCESSORS}" -o $(( PROCESSORS )) -lt 1 ] && PROCESSORS=1
28
export PROCESSORS
@@ -18,6 +30,8 @@ export PROCESSORS
30
# make sure ${NULL} is empty
31
export NULL=
32
33
+# -----------------------------------------------------------------------------
34
+
35
cd "${NETDATA_MAKESELF_PATH}" || exit 1
36
37
. ./functions.sh "${@}" || exit 1