-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bash_profile
32 lines (27 loc) · 1.15 KB
/
.bash_profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
# login to new session (local or ssh into machine)
# note also sources .bashrc; also, exports are done once here and available thereafter
clear # clear the screen
source "${HOME}/.verbosity_logging" # provides log and sb functions
verbLog 1 "Entering ~/.bash_profile..."
# The things we need once per session, in preferred order
declare -a profile_config_files=(
"${HOME}/.path" # Can be used to extend `$PATH`
"${HOME}/.exports" # Set environment variables including default editor
"${HOME}/.extra" # Can be used for machine specific or secret settings
"${HOME}/.bashrc" # Prompt, alias, functions, keybindings, etc
"${HOME}/.multiple_runtime_version_management" # asdf for languages and nvim
"${HOME}/.greeting" # fastfetch if available
)
for file in "${profile_config_files[@]}"; do
if [ -r "${file}" ] && [ -f "${file}" ]; then
verbLog 1 "Sourcing ${file} from .bash_profile..."
# shellcheck source=/dev/null
source "${file}";
else
verbLog 1 "Skipped ${file} (not readable or does not exist)."
fi
verbLog 1 "Done."
done
unset file
verbLog 1 "Finished ~/.bash_profile"