Merge pull request #200 from sgerrand/ignore-bash_profile-if-nonexistent
Adds write permission test on ~/.bash_profile prior to backup attempt
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
BASH_IT="$HOME/.bash_it"
|
BASH_IT="$HOME/.bash_it"
|
||||||
|
|
||||||
cp $HOME/.bash_profile $HOME/.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"
|
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
|
cp $HOME/.bash_it/template/bash_profile.template.bash $HOME/.bash_profile
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user