Last active
August 29, 2015 13:56
-
-
Save timcase/8984736 to your computer and use it in GitHub Desktop.
This is the script used to configure bash, vim, git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function die() | |
{ | |
echo "${@}" | |
exit 1 | |
} | |
# Add <strong>.old</strong> to any existing Vim file in the home directory | |
#for i in $HOME/.vim $HOME/.vimrc $HOME/.gvimrc; do | |
#if [ -e $i ]; then | |
#echo "${i} has been renamed to ${i}.old" | |
#mv "${i}" "${i}.old" || die "Could not move ${i} to ${i}.old" | |
#fi | |
#done | |
#Make bin dir in home folder | |
mkdir $HOME/bin | |
# Clone dotfiles | |
git clone https://github.com/timcase/dotfiles.git $HOME/bin/dotfiles \ | |
|| die "Could not clone the repository to ${HOME}/bin/dotfiles" | |
#Install janus | |
curl -Lo- https://bit.ly/janus-bootstrap | bash | |
#Symlink vim dotfiles | |
ln -s ~/bin/dotfiles/vimrc.before ~/.vimrc.before | |
ln -s ~/bin/dotfiles/vimrc.after ~/.vimrc.after | |
ln -s ~/bin/dotfiles/vimrc.after ~/.gvimrc.after | |
ln -s ~/bin/dotfiles/vim/janus ~/.janus | |
#Git config | |
ln -s ~/bin/dotfiles/git/gitconfig ~/.gitconfig | |
#Source bash from bin/dotfiles | |
echo ". ~/bin/dotfiles/bashrc" > ~/.bashrc | |
(echo "if [ -f ~/.bashrc ];"; echo "then"; echo " source~/.bashrc"; echo "fi") > ~/.bash_profile | |
#VCprompt script to show version control info | |
curl -sL https://raw.github.com/timcase/vcprompt/master/bin/vcprompt > ~/bin/vcprompt | |
chmod 755 ~/bin/vcprompt | |
#RVM global gems | |
#rm ~/.rvm/gemsets/global.gems | |
#ln -nfs ~/bin/dotfiles/global.gems ~/.rvm/gemsets/global.gems | |
#IRB | |
ln -nfs ~/bin/dotfiles/irbrc ~/.irbrc | |
#Ruby Gems | |
ln -nfs ~/bin/dotfiles/gemrc ~/.gemrc | |
touch ~/bin/dotfiles/bash/locals | |
source ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment