From 39f4c1b6fb3eb2bfc95bc6c05fa5df8b02c4387a Mon Sep 17 00:00:00 2001 From: Chad Netzer Date: Tue, 26 Apr 2011 12:22:35 -0700 Subject: [PATCH] Add existence test for installed profile.d bash setup. --- install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 1733728..6bff9da 100755 --- a/install.sh +++ b/install.sh @@ -60,7 +60,9 @@ if [ -d "/etc/profile.d" ]; then echo "Adding the /etc/profile.d/autojump.bash to your .bashrc" echo "" >> ~/.bashrc echo "# Added by autojump install.sh" >> ~/.bashrc - echo "source /etc/profile.d/autojump.bash" >> ~/.bashrc + echo "if [ -f /etc/profile.d/autojump.bash ]; then" >> ~/.bashrc + echo " source /etc/profile.d/autojump.bash" >> ~/.bashrc + echo "fi" >> ~/.bashrc fi echo "Done!" echo