Skip to content

Commit

Permalink
add auto-install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
vgod committed Aug 13, 2011
1 parent 6f48a53 commit 4bfa8a5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -32,8 +32,9 @@ which can be upgraded with `git pull`. For example, to upgrade Command-T
cd ~/.vim/bundle/command-t
git pull

To install a new plugin as a git submoudle, type
To install a new plugin as a git submoudle, type the followin commands.

cd ~/.vim
git submodule add [GIT-REPOSITORY-URL] bundle/[PLUGIN-NAME]

HOW TO USE
Expand Down
26 changes: 26 additions & 0 deletions auto-install.sh
@@ -0,0 +1,26 @@
#!/bin/sh
VIMHOME=~/.vim

warn() {
echo "$1" >&2
}

die() {
warn "$1"
exit 1
}

[ -e "$VIMHOME/vimrc" ] && die "$VIMHOME/vimrc already exists."
[ -e "~/.vim" ] && die "~/.vim already exists."
[ -e "~/.vimrc" ] && die "~/.vimrc already exists."

git clone https://github.com/vgod/vimrc "$VIMHOME"
cd "$VIMHOME"
git submodule update --init

./install-vimrc.sh

cd bundle/command-t/ruby/command-t
(ruby extconf.rb && make) || warn "Can't compile Command-T."

echo "vgod's vimrc is installed."

0 comments on commit 4bfa8a5

Please sign in to comment.