diff options
author | u <u@billy> | 2023-05-01 08:05:09 -0400 |
---|---|---|
committer | u <u@billy> | 2023-05-01 08:05:09 -0400 |
commit | 79b0dee7daed2f457cb5b56fedbfbe4d5a88ccad (patch) | |
tree | 0c2166c162e9d1fc714de5461800399498aac85d | |
parent | 54044f48b27865c8616cbfa932eb31142d631d92 (diff) |
avoid sourcing .bashrc twice
-rw-r--r-- | dot/bash_profile | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/dot/bash_profile b/dot/bash_profile index 9c34c0e..44b50e0 100644 --- a/dot/bash_profile +++ b/dot/bash_profile | |||
@@ -1,5 +1,11 @@ | |||
1 | . ~/.profile | 1 | # `.profile` is expected to source `.bashrc`. Source here only as fallback. |
2 | . ~/.bashrc | 2 | if [ -f ~/.profile ] |
3 | then | ||
4 | . ~/.profile | ||
5 | elif [ -f ~/.bashrc ] | ||
6 | then | ||
7 | . ~/.bashrc | ||
8 | fi | ||
3 | 9 | ||
4 | if [ "$SHLVL" = 1 ] && [ "$(tty)" = /dev/tty1 ] | 10 | if [ "$SHLVL" = 1 ] && [ "$(tty)" = /dev/tty1 ] |
5 | then | 11 | then |