diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:22:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:22:44 +0000 |
commit | 1e6c93250172946eeb38e94a92a1fd12c9d3011e (patch) | |
tree | 8ca5e16dfc7ad6b3bf2738ca0a48408a950f8f7e /makeself/jobs/99-makeself.install.sh | |
parent | Update watch file (diff) | |
download | netdata-1e6c93250172946eeb38e94a92a1fd12c9d3011e.tar.xz netdata-1e6c93250172946eeb38e94a92a1fd12c9d3011e.zip |
Merging upstream version 1.11.0+dfsg.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'makeself/jobs/99-makeself.install.sh')
-rwxr-xr-x | makeself/jobs/99-makeself.install.sh | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/makeself/jobs/99-makeself.install.sh b/makeself/jobs/99-makeself.install.sh index 698f2f92d..0e0d5c9da 100755 --- a/makeself/jobs/99-makeself.install.sh +++ b/makeself/jobs/99-makeself.install.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: GPL-3.0-or-later . $(dirname "${0}")/../functions.sh "${@}" || exit 1 @@ -12,18 +13,18 @@ ORIGIN="$(git config --get remote.origin.url || echo "unknown")" if [[ "${ORIGIN}" =~ ^git@github.com:.*/netdata.*$ ]] then NOWNER="${ORIGIN/git@github.com:/}" - NOWNER="${NOWNER/\/netdata*/}" + NOWNER="$( echo ${NOWNER} | cut -d '/' -f 1 )" elif [[ "${ORIGIN}" =~ ^https://github.com/.*/netdata.*$ ]] then NOWNER="${ORIGIN/https:\/\/github.com\//}" - NOWNER="${NOWNER/\/netdata*/}" + NOWNER="$( echo ${NOWNER} | cut -d '/' -f 1 )" fi # make sure it does not have any slashes in it NOWNER="${NOWNER//\//_}" -if [ "${NOWNER}" = "firehol" ] +if [ "${NOWNER}" = "netdata" ] then NOWNER= else @@ -64,6 +65,7 @@ run mv "${NETDATA_INSTALL_PATH}/bin/netdata" \ cat >"${NETDATA_INSTALL_PATH}/bin/netdata" <<EOF #!${NETDATA_INSTALL_PATH}/bin/bash +export NETDATA_BASH_LOADABLES="DISABLE" export PATH="${NETDATA_INSTALL_PATH}/bin:\${PATH}" exec "${NETDATA_INSTALL_PATH}/bin/srv/netdata" "\${@}" EOF @@ -71,27 +73,6 @@ run chmod 755 "${NETDATA_INSTALL_PATH}/bin/netdata" # ----------------------------------------------------------------------------- -# move etc to protect the destination when unpacked - -if [ ! -z "${NETDATA_INSTALL_PATH}" -a -d "${NETDATA_INSTALL_PATH}/etc" ] - then - if [ -d "${NETDATA_INSTALL_PATH}/etc.new" ] - then - run rm -rf "${NETDATA_INSTALL_PATH}/etc.new" || exit 1 - fi - - run mv "${NETDATA_INSTALL_PATH}/etc" \ - "${NETDATA_INSTALL_PATH}/etc.new" || exit 1 - - if [ -f "${NETDATA_INSTALL_PATH}/etc.new/netdata/netdata.conf" ] - then - # delete the generated netdata.conf, so that the static installer will generate a new one - run rm "${NETDATA_INSTALL_PATH}/etc.new/netdata/netdata.conf" - fi -fi - - -# ----------------------------------------------------------------------------- # remove the links to allow untaring the archive run rm "${NETDATA_INSTALL_PATH}/sbin" \ |