Add check against executing bashrcd twice

This commit is contained in:
JeremyStar™ 2024-06-03 02:14:46 +02:00
parent d59568b1ea
commit 7d827a82da
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D

View file

@ -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"