Code Review
/
common
/
bash_it.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
eb40413
)
Adds write permission test on ~/.bash_profile prior to backup attempt. Fixes #199.
author
Sasha Gerrand
<sasha.gerrand@bigcommerce.com>
Wed, 24 Apr 2013 03:05:28 +0000
(13:05 +1000)
committer
Sasha Gerrand
<sasha.gerrand@bigcommerce.com>
Wed, 24 Apr 2013 03:05:28 +0000
(13:05 +1000)
install.sh
patch
|
blob
|
history
diff --git
a/install.sh
b/install.sh
index
0f1da39
..
46edcf2
100755
(executable)
--- a/
install.sh
+++ b/
install.sh
@@
-1,9
+1,9
@@
#!/usr/bin/env bash
BASH_IT="$HOME/.bash_it"
-cp $HOME/.bash_profile $HOME/.bash_profile.bak
-
-echo "Your original .bash_profile has been backed up to .bash_profile.bak"
+test -w $HOME/.bash_profile &&
+ cp $HOME/.bash_profile $HOME/.bash_profile.bak &&
+
echo "Your original .bash_profile has been backed up to .bash_profile.bak"
cp $HOME/.bash_it/template/bash_profile.template.bash $HOME/.bash_profile