From 3bc2a98a1bdd7109a187ad9caa3a24a1912ee08e Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Fri, 11 Oct 2013 15:07:51 +0200 Subject: [PATCH] Use rcm instead of ./install.sh The rcm suite is designed to replace the `./install.sh` script found in this and many other dotfiles repos across GitHub. By using rcm users can combine multiple dotfiles repos, tag dotfiles, have host-specific dotfiles, and other powerful features. This commit removes `install.sh`, updates the README, adds a post-up hook that vundles the vim bundles, and adds a `rcrc` configuration that ignores `README.md` and `LICENSE` and sets the dotfiles directory to just `dotfiles`. --- README.md | 17 +++++++++++++---- hooks/post-up | 6 ++++++ install.sh | 21 --------------------- rcrc | 2 ++ 4 files changed, 21 insertions(+), 25 deletions(-) create mode 100755 hooks/post-up delete mode 100755 install.sh create mode 100644 rcrc diff --git a/README.md b/README.md index 2e43033..f13d5e8 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,11 @@ Set zsh as your login shell. chsh -s /bin/zsh +Install [rcm](https://github.com/mike-burns/rcm). + + brew tap mike-burns/rcm + brew install rcm + Install ------- @@ -20,12 +25,16 @@ updated](http://robots.thoughtbot.com/keeping-a-github-fork-updated)). Install: - cd dotfiles - ./install.sh + rcup -d dotfiles -x README.md -x LICENSE -This will create symlinks for config files in your home directory. +This will create symlinks for config files in your home directory. The +`-x` options, which exclude the `README.md` and `LICENSE` files, are +needed during installation but can be skipped once the `.rcrc` +configuration file is symlinked in. -You can safely run `./install.sh` multiple times to update. +You can safely run `rcup` multiple times to update: + + rcup Make your own customizations ---------------------------- diff --git a/hooks/post-up b/hooks/post-up new file mode 100755 index 0000000..3b84280 --- /dev/null +++ b/hooks/post-up @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ ! -e $HOME/.vim/bundle/vundle ]; then + git clone https://github.com/gmarik/vundle.git $HOME/.vim/bundle/vundle + vim -u $HOME/.vimrc.bundles +BundleInstall +qa +fi diff --git a/install.sh b/install.sh deleted file mode 100755 index 646f795..0000000 --- a/install.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -for name in *; do - target="$HOME/.$name" - if [ -e "$target" ]; then - if [ ! -L "$target" ]; then - echo "WARNING: $target exists but is not a symlink." - fi - else - if [ "$name" != 'install.sh' ] && [ "$name" != 'README.md' ] && ["$name" != 'LICENSE' ]; then - echo "Creating $target" - ln -s "$PWD/$name" "$target" - fi - fi -done - -if [ ! -e ~/.vim/bundle/vundle ]; then - git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle -fi - -vim -u ~/.vimrc.bundles +BundleInstall +qa diff --git a/rcrc b/rcrc new file mode 100644 index 0000000..21eb74b --- /dev/null +++ b/rcrc @@ -0,0 +1,2 @@ +EXCLUDES="README.md LICENSE" +DOTFILES_DIRS="$HOME/dotfiles"