Skip to content

Instantly share code, notes, and snippets.

@aliou
Created February 25, 2012 23:00
Show Gist options
  • Save aliou/1911475 to your computer and use it in GitHub Desktop.
Save aliou/1911475 to your computer and use it in GitHub Desktop.
dotfiles install
#!/bin/sh
echo "Renaming old files to <file>_old."
mv ~/.bashrc ~/.bashrc_old 2>/dev/null
mv ~/.inputrc ~/.inputrc_old 2>/dev/null
mv ~/.profile ~/.profile_old 2>/dev/null
mv ~/.vim ~/.vim_old 2>/dev/null
mv ~/.vimrc ~/.vimrc_old 2>/dev/null
echo "Downloading dotfiles."
git clone git://github.com/aldl/dotfiles.git ~/.dotfiles
echo "Downloading vimfiles."
git clone git://github.com/aldl/dotvim.git ~/.dotvim
echo "Linking stuff."
ln -s ~/.dotfiles/bash/bashrc ~/.bashrc
ln -s ~/.dotfiles/bash/inputrc ~/.inputrc
ln -s ~/.dotfiles/bash/profile ~/.profile
ln -s ~/.dotvim/vim ~/.vim
ln -s ~/.dotvim/vimrc ~/.vimrc
echo "Downloading git submodules."
cd ~/.dotvim
git submodule update --init
cd
platform=`uname -s`
if [ $platform = "Darwin" ]
then
echo "os x for hackers."
curl -fsSL https://raw.github.com/gist/1156293 | sh
echo "Git config."
curl -fsSL https://raw.github.com/gist/2857347 | sh
elif [ $platform = "Linux" ]
then
cd ~/.dotfiles
git checkout opensuse >/dev/null
cd ~
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment