diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2014-10-03 09:54:35 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2014-10-03 09:54:35 +1300 |
commit | b6d9922b196b04ca4e3777c7ddafafe3ebd456ed (patch) | |
tree | 29f04c71149917adce84e7e45fcf204aeecd8f51 | |
parent | Wrapper for pwgen to give it sensible defaults (diff) | |
download | dotfiles-b6d9922b196b04ca4e3777c7ddafafe3ebd456ed.tar.gz dotfiles-b6d9922b196b04ca4e3777c7ddafafe3ebd456ed.zip |
Use find(1) loop as a recursive install emulator
-rw-r--r-- | Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -100,10 +100,11 @@ install-vim : install -m 0644 vim/after/ftplugin/* $(HOME)/.vim/after/ftplugin install -m 0644 vim/after/plugin/* $(HOME)/.vim/after/plugin git submodule update --init - for plugin in vim/bundle/* ; do \ - rm -fr $(HOME)/.vim/bundle/"$${plugin##*/}" ; \ - cp -r "$$plugin" $(HOME)/.vim/bundle ; \ - rm -fr $(HOME)/.vim/bundle/"$${plugin##*/}"/.git* ; \ + find vim/bundle -type d \( -name .git -prune -o -type d -print \) | while IFS= read -r dir ; do \ + install -d -- "$${dir}" $(HOME)/.vim/"$${dir#vim/}" ; \ + done + find vim/bundle -type f ! -name '.git*' | while IFS= read -r file ; do \ + install -- "$${file}" $(HOME)/.vim/"$${file#vim/}" ; \ done rm -f $(HOME)/.vim/autoload/pathogen.vim ln -s ../bundle/pathogen/autoload/pathogen.vim \ |