dotfiles/install.sh
2012-02-19 15:59:05 -05:00

57 lines
1,020 B
Bash
Executable file

#!/bin/bash
# Clears out the old .bashrc
if [ -f ~/.bashrc ];
then
rm ~/.bashrc
fi
# Grabs the skeleton .bashrc
cp /etc/skel/.bashrc ~/.bashrc
PWD=`pwd`
# Adds paths and custom .bashrc
echo "
export PATH=\"$PWD/git:$PATH\"
if [ -f $PWD/bashrc ] && ! shopt -oq posix; then
. $PWD/bashrc
fi" >> ~/.bashrc
# Removes the existing scripts
if [ -d ~/.gnome2/nautilus-scripts ];
then
rm ~/.gnome2/nautilus-scripts -rf
fi
# Symlinks back to our scripts
ln -s $PWD/nautilus-scripts ~/.gnome2/nautilus-scripts
# Copies .vimrc
if [ -f ~/.vimrc ];
then
rm ~/.vimrc
fi
cp $PWD/vimrc ~/.vimrc
# Pulls down and installs vim plugins
DOTVIM=~/.vim
if [ -d $DOTVIM ];
then
rm -r $DOTVIM
fi
mkdir $DOTVIM
OWNERS=( "scrooloose" "msanders" "ervandew" "scrooloose" )
REPOS=( "nerdtree" "snipmate.vim" "supertab" "syntastic" )
for (( i = 0 ; i < ${#OWNERS[@]} ; i++ ))
do
git clone git://github.com/${OWNERS[$i]}/${REPOS[$i]}.git /tmp/${REPOS[$i]}
cp -R /tmp/${REPOS[$i]}/* $DOTVIM
rm -rf /tmp/${REPOS[$i]}
done