2020-05-19 15:34:28 +00:00
|
|
|
#!/usr/bin/env bash
|
2019-03-15 13:40:03 +00:00
|
|
|
#
|
|
|
|
# ~/.bash_profile
|
|
|
|
#
|
2020-05-19 15:34:28 +00:00
|
|
|
# shellcheck disable=SC1090
|
2019-03-15 13:40:03 +00:00
|
|
|
|
2020-05-28 16:06:54 +00:00
|
|
|
# ensure bash is set up for its initial sourcing
|
|
|
|
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
|
|
|
|
|
2020-05-19 15:34:28 +00:00
|
|
|
# load global sh env vars
|
|
|
|
[ -f "$XDG_CONFIG_HOME/sh/env" ] && source "$XDG_CONFIG_HOME/sh/env"
|
|
|
|
if [ -d "$XDG_CONFIG_HOME/sh/env.d" ]; then
|
2022-06-28 08:24:57 +00:00
|
|
|
for _env in "$XDG_CONFIG_HOME/sh/env.d"/*.sh; do
|
|
|
|
. "$_env"
|
|
|
|
done
|
|
|
|
unset _env
|
|
|
|
fi
|
|
|
|
[ -f "$XDG_CONFIG_HOME/bash/env" ] && source "$XDG_CONFIG_HOME/bash/env"
|
|
|
|
if [ -d "$XDG_CONFIG_HOME/bash/env.d" ]; then
|
|
|
|
for _env in "$XDG_CONFIG_HOME/bash/env.d"/*.sh; do
|
|
|
|
. "$_env"
|
|
|
|
done
|
|
|
|
unset _env
|
2019-03-15 13:40:03 +00:00
|
|
|
fi
|
|
|
|
|
2020-05-19 15:34:28 +00:00
|
|
|
# load profile files vars
|
|
|
|
[ -f "$XDG_CONFIG_HOME/sh/profile" ] && source "$XDG_CONFIG_HOME/sh/profile"
|
|
|
|
if [ -d "$XDG_CONFIG_HOME/sh/profile.d" ]; then
|
2022-06-28 08:24:57 +00:00
|
|
|
for _profile in "$XDG_CONFIG_HOME/sh/profile.d"/*.sh; do
|
|
|
|
. "$_profile"
|
|
|
|
done
|
|
|
|
unset _profile
|
|
|
|
fi
|
|
|
|
[ -f "$XDG_CONFIG_HOME/bash/profile" ] && source "$XDG_CONFIG_HOME/bash/profile"
|
|
|
|
if [ -d "$XDG_CONFIG_HOME/bash/profile.d" ]; then
|
|
|
|
for _profile in "$XDG_CONFIG_HOME/bash/profile.d"/*.sh; do
|
|
|
|
. "$_profile"
|
|
|
|
done
|
|
|
|
unset _profile
|
2020-05-19 15:34:28 +00:00
|
|
|
fi
|
2019-11-17 22:02:17 +00:00
|
|
|
|
2020-05-19 15:34:28 +00:00
|
|
|
# shellcheck disable=SC1090
|
|
|
|
[[ -f ~/.bashrc ]] && . ~/.bashrc
|