fix(posix): run load.sh only once when .bashrc sources .profile

This commit is contained in:
Lockszmith
2023-11-21 11:28:17 -07:00
committed by AJ ONeal
parent ec33462ae0
commit ea99790768
+5
View File
@@ -287,6 +287,9 @@ __bootstrap_webi() {
if ! test -e ~/.config/envman/load.sh; then
# shellcheck disable=SC2016
{
echo 'if [ -z "$ENVMAN_LOADED" ]; then'
echo ' ENVMAN_LOADED=1'
echo '# Generated for envman. Do not edit.'
echo 'for x in ~/.config/envman/*.env; do'
echo ' my_basename="$(basename "${x}")"'
@@ -297,6 +300,8 @@ __bootstrap_webi() {
echo ' # shellcheck source=/dev/null'
echo ' . "${x}"'
echo 'done'
echo 'fi'
} > ~/.config/envman/load.sh
fi