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 1/3] 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 From cedd9523357e8fb960acc030ebdf543d8943ab8a Mon Sep 17 00:00:00 2001 From: James Hare <35114009+JamesHare@users.noreply.github.com> Date: Thu, 16 Apr 2020 21:20:24 -0500 Subject: [PATCH 2/3] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 417c6a2..a54f3ea 100755 --- a/install.sh +++ b/install.sh @@ -10,7 +10,7 @@ if test -f "$FILE"; then echo "$FILE detected" else echo "$FILE not detected. Creating it now." && - touch FILE + touch ~/.bash_profile fi # Add newline at the end of the '.bash_profile' if it doesn't exist From e1b5c78589c567fbfac89b1856b23280417adae9 Mon Sep 17 00:00:00 2001 From: James Hare <35114009+JamesHare@users.noreply.github.com> Date: Thu, 16 Apr 2020 21:23:04 -0500 Subject: [PATCH 3/3] Update install.sh --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index a54f3ea..b221fa8 100755 --- a/install.sh +++ b/install.sh @@ -10,7 +10,7 @@ if test -f "$FILE"; then echo "$FILE detected" else echo "$FILE not detected. Creating it now." && - touch ~/.bash_profile + touch $FILE fi # Add newline at the end of the '.bash_profile' if it doesn't exist