summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kluyver <takowl@gmail.com>2017-12-08 10:53:53 +0000
committerGitHub <noreply@github.com>2017-12-08 10:53:53 +0000
commit7dadb439e6edda278cde484919e4f41d5fd23ffb (patch)
tree35c48cc92852d2bf83009dd49548dc0b5ab565bb
parent08c0c79f1dd240ba972be74d9857b333280e20c7 (diff)
parentdc3c86e2263dae09e03243d72e92d4277a6812a1 (diff)
downloadpexpect-git-7dadb439e6edda278cde484919e4f41d5fd23ffb.tar.gz
Merge pull request #457 from zimbatm/better-bashrc
handle more OSes
-rw-r--r--pexpect/bashrc.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/pexpect/bashrc.sh b/pexpect/bashrc.sh
index 99a3ac2..a4511c6 100644
--- a/pexpect/bashrc.sh
+++ b/pexpect/bashrc.sh
@@ -1,5 +1,12 @@
-source /etc/bash.bashrc
-source ~/.bashrc
+if [[ -f /etc/bashrc ]]; then
+ source /etc/bashrc
+fi
+if [[ -f /etc/bash.bashrc ]]; then
+ source /etc/bash.bashrc
+fi
+if [[ -f ~/.bashrc ]]; then
+ source ~/.bashrc
+fi
# Reset PS1 so pexpect can find it
PS1="$"