aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-10-03 09:54:35 +1300
committerTom Ryder <tom@sanctum.geek.nz>2014-10-03 09:54:35 +1300
commitb6d9922b196b04ca4e3777c7ddafafe3ebd456ed (patch)
tree29f04c71149917adce84e7e45fcf204aeecd8f51 /Makefile
parentWrapper for pwgen to give it sensible defaults (diff)
downloaddotfiles-b6d9922b196b04ca4e3777c7ddafafe3ebd456ed.tar.gz
dotfiles-b6d9922b196b04ca4e3777c7ddafafe3ebd456ed.zip
Use find(1) loop as a recursive install emulator
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 4852cd3d..b9c07e79 100644
--- a/Makefile
+++ b/Makefile
@@ -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 \