From 606c4eaa67e956b9dfc2c7b1d438165541065e36 Mon Sep 17 00:00:00 2001 From: James Hare <35114009+JamesHare@users.noreply.github.com> Date: Thu, 16 Apr 2020 21:13:34 -0500 Subject: [PATCH] Fix Issue #7 .bash_profile: No such file or directory while installing --- install.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install.sh b/install.sh index 3ea681f..417c6a2 100755 --- a/install.sh +++ b/install.sh @@ -5,6 +5,14 @@ curl -o ~/.git-bash-for-mac.sh https://raw.githubusercontent.com/fabriziocucci/g curl -o ~/.git-completion.bash https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash curl -o ~/.git-prompt.sh https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh +FILE=~/.bash_profile +if test -f "$FILE"; then + echo "$FILE detected" +else + echo "$FILE not detected. Creating it now." && + touch FILE +fi + # Add newline at the end of the '.bash_profile' if it doesn't exist sed -i '' '$a\' ~/.bash_profile