diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-03-27 01:15:56 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-03-27 01:15:56 +0300 |
commit | 547fd9f2b85a2591322cd93d641dd3b2948a4a1f (patch) | |
tree | c02cac23c291fb544197506b402a0e9095d06038 /makeself/run-all-jobs.sh | |
parent | 369aa19108ae957ba5489a6831742f2abd0314b3 (diff) |
convert relative paths to absolute
Diffstat (limited to 'makeself/run-all-jobs.sh')
-rwxr-xr-x | makeself/run-all-jobs.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/makeself/run-all-jobs.sh b/makeself/run-all-jobs.sh index 4c3236c15a..3b15a899fd 100755 --- a/makeself/run-all-jobs.sh +++ b/makeself/run-all-jobs.sh @@ -6,11 +6,23 @@ 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 @@ -18,6 +30,8 @@ export PROCESSORS # make sure ${NULL} is empty export NULL= +# ----------------------------------------------------------------------------- + cd "${NETDATA_MAKESELF_PATH}" || exit 1 . ./functions.sh "${@}" || exit 1 |