diff options
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 698f2f92..0e0d5c9d 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" \ |