Permit custom dir for bash-it.

pull/221/head
Marc Egea i Sala 2013-07-28 23:33:34 +02:00
parent 8d7a9cc1bb
commit dda3f16646
2 changed files with 3 additions and 3 deletions

View File

@ -1,11 +1,11 @@
#!/usr/bin/env bash #!/usr/bin/env bash
BASH_IT="$HOME/.bash_it" BASH_IT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
test -w $HOME/.bash_profile && test -w $HOME/.bash_profile &&
cp $HOME/.bash_profile $HOME/.bash_profile.bak && 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 sed "s/__BASH_IT__/$(echo $BASH_IT | sed 's/\//\\\//g')/g" $BASH_IT/template/bash_profile.template.bash > $HOME/.bash_profile
echo "Copied the template .bash_profile into ~/.bash_profile, edit this file to customize bash-it" echo "Copied the template .bash_profile into ~/.bash_profile, edit this file to customize bash-it"

View File

@ -7,7 +7,7 @@
export PATH=$PATH:~/.gem/ruby/1.8/bin:/opt/nginx/sbin export PATH=$PATH:~/.gem/ruby/1.8/bin:/opt/nginx/sbin
# Path to the bash it configuration # Path to the bash it configuration
export BASH_IT=$HOME/.bash_it export BASH_IT=__BASH_IT__
# Lock and Load a custom theme file # Lock and Load a custom theme file
# location /.bash_it/themes/ # location /.bash_it/themes/