Deduce $BASH_IT relative to install script location at execution

Instead of assuming it is located at ~/.bash_it which might very well not be the case
pull/174/head
nickl- 2012-12-06 16:00:01 +02:00
parent 6f0a147c01
commit b547b107bc
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# bash-it installer
BASH_IT="${HOME}/.bash_it"
BASH_IT=$(cd ${0%/*} && echo ${PWD})
cd "${OLDPWD}"
cp "${HOME}/.bash_profile" "${HOME}/.bash_profile.bak"
cp "${HOME}/.bash_it/template/bash_profile.template.bash" "${HOME}/.bash_profile"