#!/bin/sh# SPDX-License-Identifier: GPL-3.0-or-later# Next unused error code: I0012exportPATH="${PATH}:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
uniquepath(){path=""tmp="$(mktemp)"(echo"${PATH}"|tr":""\n")>"$tmp"whileread-rREPLY;doifecho"${path}"|grep-v"(^|:)${REPLY}(:|$)";then[-n"${path}"]&&path="${path}:"path="${path}${REPLY}"fidone<"$tmp"
rm"$tmp"[-n"${path}"]exportPATH="${path%:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin}"}>/dev/null
uniquepath
PROGRAM="$0"NETDATA_SOURCE_DIR="$(pwd)"INSTALLER_DIR="$(dirname"${PROGRAM}")"if["${NETDATA_SOURCE_DIR}"!="${INSTALLER_DIR}"]&&["${INSTALLER_DIR}"!="."];thenecho>&2"Warning: you are currently in '${NETDATA_SOURCE_DIR}' but the installer is in '${INSTALLER_DIR}'."fi# -----------------------------------------------------------------------------# reload the user profile# shell