aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap.sh
diff options
context:
space:
mode:
authorMatijs Brinkhuis <matijs@gmail.com>2011-09-27 22:58:44 +0300
committerMatijs Brinkhuis <matijs@gmail.com>2011-09-27 22:58:44 +0300
commit61a11c914eaa568b313b6528ab592859904e62e7 (patch)
tree0aec4761ba17c3d29ec139c1c0024b8c476b69c7 /bootstrap.sh
parentcf47c75acde8e8f20d74f514bbc61693aa579c04 (diff)
downloaddotfiles-61a11c914eaa568b313b6528ab592859904e62e7.tar.gz
dotfiles-61a11c914eaa568b313b6528ab592859904e62e7.tar.bz2
dotfiles-61a11c914eaa568b313b6528ab592859904e62e7.zip
make it possible for bootstap.sh to be executed from wherever
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-xbootstrap.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index d94b378..49c0ad1 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -1,7 +1,11 @@
+currentdir=`pwd`
+dotdir=`dirname $0`
+cd $dotdir
git pull
read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" --exclude "README.md" -av . ~
fi
-source "$HOME/.bash_profile" \ No newline at end of file
+source "$HOME/.bash_profile"
+cd $currentdir \ No newline at end of file