1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,29 @@ |
1 |
+## For non-interactive shells, source `.bash_profile` instead |
|
2 |
+# This happens e.g. with `ssh`. |
|
3 |
+case $- in |
|
4 |
+ *i*) ;; |
|
5 |
+ *) |
|
6 |
+ # Source Bash login shell startup script. |
|
7 |
+ if [ -r "$HOME/.bash_profile" ] |
|
8 |
+ then |
|
9 |
+ . "$HOME/.bash_profile" |
|
10 |
+ fi |
|
11 |
+ return 0 |
|
12 |
+ ;; |
|
13 |
+esac |
|
14 |
+ |
|
15 |
+## Source POSIX interactive shell startup script |
|
16 |
+if [ -r "$HOME/.shrc" ] |
|
17 |
+then |
|
18 |
+ . "$HOME/.shrc" |
|
19 |
+fi |
|
20 |
+ |
|
21 |
+## Source Bash interactive shell startup scripts |
|
22 |
+for path in "$HOME/.bashrc.d/"*".bash" |
|
23 |
+do |
|
24 |
+ if [ -r "$path" ] |
|
25 |
+ then |
|
26 |
+ . "$path" |
|
27 |
+ fi |
|
28 |
+done |
|
29 |
+unset path |