feat(profile): use existing helpers to manage profile files (just like rc ones)

This commit is contained in:
2026-07-22 22:19:07 +02:00
parent ee5e92e0a4
commit 2d8b9a5309
+6 -3
View File
@@ -39,9 +39,12 @@ if [ -z "${BASH_CONFIG_DIR}" ]; then
BASH_CONFIG_DIR=$(get_script_dir) BASH_CONFIG_DIR=$(get_script_dir)
fi fi
if [ -f "${BASH_CONFIG_DIR}"/profile ]; then source "${BASH_CONFIG_DIR}"/profile; fi # Source some helpers functions
if [ -d "${BASH_CONFIG_DIR}"/profile ]; then for file in "${BASH_CONFIG_DIR}"/profile/*; do source "$file"; done; fi source "${BASH_CONFIG_DIR}/_helpers.bash"
if [ -d "${BASH_CONFIG_DIR}"/profile.d ]; then for file in "${BASH_CONFIG_DIR}"/profile.d/*; do source "$file"; done; fi
_source_file_if_exists "${BASH_CONFIG_DIR}/profile"
_source_dir_files "${BASH_CONFIG_DIR}/profile"
_source_dir_files "${BASH_CONFIG_DIR}/profile.d"
# This file is sourced by bash for login shells. The following line # This file is sourced by bash for login shells. The following line
# runs your .bashrc and is recommended by the bash info pages. # runs your .bashrc and is recommended by the bash info pages.