Skip to content

Commit

Permalink
Added an installation script.
Browse files Browse the repository at this point in the history
  • Loading branch information
eserge committed May 9, 2016
1 parent ca58108 commit 3ed9bed
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
@@ -0,0 +1,7 @@
# My configuration files

Use this command to install:

```
$ curl https://raw.githubusercontent.com/eserge/dotfiles/master/dotfiles.sh | sh
```
38 changes: 38 additions & 0 deletions dotfiles.sh
@@ -0,0 +1,38 @@
#!/usr/bin/env sh

VIM_DIR=~/.vim/
VIM_COLORS_DIR=~/.vim/colors/
VIMRC_FILE=~/.vimrc
GITCONFIG_FILE=~/.gitconfig

echo "Creating vim dirs."
if ! [ -e "VIM_COLORS_DIR" ]; then
mkdir -p "$VIM_COLORS_DIR"
fi

cd "$VIM_DIR"
echo "Downloading color schemes"
curl https://raw.githubusercontent.com/tomasr/molokai/master/colors/molokai.vim > colors/molokai.vim

echo "Installing Neobundle"
curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh | sh
cd ..

echo "Cloning dotfiles configuration repository"
git clone https://github.com/eserge/dotfiles.git .dotfiles

echo "Linking .vimrc file"
if [ -e "$VIMRC_FILE" ]; then
mv "$VIMRC_FILE" ~/.vimrc.back-`date +"%Y-%m-%d"`
fi
ln -s ~/.dotfiles/vim/_vimrc ~/.vimrc

echo "Linking .gitconfig file"
if [ -e "$GITCONFIG_FILE" ]; then
mv "$GITCONFIG_FILE" ~/.gitconfigmachine
else
touch .gitconfigmachine
fi
ln -s ~/.dotfiles/git/_gitconfig ~/.gitconfig

echo "Done."

0 comments on commit 3ed9bed

Please sign in to comment.