mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-24 14:56:15 +02:00
34fe2478a2
Co-Authored-By: Qyriad <qyriad@qyriad.me> Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
33 lines
779 B
Bash
33 lines
779 B
Bash
# shellcheck shell=bash
|
|
|
|
set -eu -o pipefail
|
|
|
|
if [[ -z "${COMMON_PATHS_SH_SOURCED-}" ]]; then
|
|
|
|
COMMON_PATHS_SH_SOURCED=1
|
|
|
|
commonDir="$(readlink -f "$(dirname "${BASH_SOURCE[0]-$0}")")"
|
|
|
|
# Since these are generated files
|
|
# shellcheck disable=SC1091
|
|
source "$commonDir/functions.sh"
|
|
# shellcheck disable=SC1091
|
|
source "$commonDir/subst-vars.sh"
|
|
# Make sure shellcheck knows this will be defined by the above generated snippet
|
|
: "${bash?}" "${bindir?}"
|
|
|
|
if ! isTestOnNixOS; then
|
|
export SHELL="$bash"
|
|
export PATH="$bindir:$PATH"
|
|
fi
|
|
|
|
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
|
|
|
|
fi # COMMON_PATHS_SH_SOURCED
|