2024-06-08 11:10:51 +00:00
|
|
|
# shellcheck shell=bash
|
|
|
|
|
2024-07-08 20:07:06 +00:00
|
|
|
set -eu -o pipefail
|
|
|
|
|
|
|
|
if [[ -z "${COMMON_PATHS_SH_SOURCED-}" ]]; then
|
|
|
|
|
|
|
|
COMMON_PATHS_SH_SOURCED=1
|
|
|
|
|
2024-06-08 11:10:51 +00:00
|
|
|
commonDir="$(readlink -f "$(dirname "${BASH_SOURCE[0]-$0}")")"
|
|
|
|
|
2024-11-01 13:56:50 +00:00
|
|
|
# Just for `isTestOnNixOS`
|
2024-07-08 20:07:06 +00:00
|
|
|
source "$commonDir/functions.sh"
|
2024-06-08 11:10:51 +00:00
|
|
|
# shellcheck disable=SC1091
|
2024-11-01 13:56:50 +00:00
|
|
|
source "${_NIX_TEST_BUILD_DIR}/common/subst-vars.sh"
|
2024-06-08 11:10:51 +00:00
|
|
|
# Make sure shellcheck knows this will be defined by the above generated snippet
|
2024-07-08 20:07:06 +00:00
|
|
|
: "${bash?}" "${bindir?}"
|
2024-06-08 11:10:51 +00:00
|
|
|
|
2024-07-08 20:07:06 +00:00
|
|
|
if ! isTestOnNixOS; then
|
|
|
|
export SHELL="$bash"
|
|
|
|
export PATH="$bindir:$PATH"
|
|
|
|
fi
|
2024-06-08 11:10:51 +00:00
|
|
|
|
|
|
|
if [[ -n "${NIX_CLIENT_PACKAGE:-}" ]]; then
|
|
|
|
export PATH="$NIX_CLIENT_PACKAGE/bin":$PATH
|
|
|
|
fi
|
|
|
|
|
|
|
|
DAEMON_PATH="$PATH"
|
|
|
|
if [[ -n "${NIX_DAEMON_PACKAGE:-}" ]]; then
|
|
|
|
DAEMON_PATH="${NIX_DAEMON_PACKAGE}/bin:$DAEMON_PATH"
|
|
|
|
fi
|
2024-07-08 20:07:06 +00:00
|
|
|
|
|
|
|
fi # COMMON_PATHS_SH_SOURCED
|