From 7d827a82dabca810f1ca601ea3ee8bcc2dd4d8db Mon Sep 17 00:00:00 2001 From: JeremyStarTM Date: Mon, 3 Jun 2024 02:14:46 +0200 Subject: [PATCH] Add check against executing bashrcd twice --- startup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/startup.sh b/startup.sh index ff25965..7fef9f7 100755 --- a/startup.sh +++ b/startup.sh @@ -2,6 +2,12 @@ # shellcheck disable=SC2154 set -eo pipefail +# Cancel execution of system-wide punktdateien-bashrc if user-wide installation is detected +if [ -n "${BASHRCD_SYSTEM}" ] && [ -d "${HOME}/.bashrc.d" ] && [ -f "${HOME}/.bashrc.d/startup.sh" ]; then + set +eo pipefail + exit 0 +fi + # Define variables export "BASHRCD_FALLBACK=exec env --ignore-environment bash --norc --noprofile"