2015-03-26 13:26:05 -04:00
|
|
|
excludes = -I Makefile -I README.md
|
2021-03-31 23:31:05 -04:00
|
|
|
symlinks = $(shell find . -maxdepth 1 \( ! -iname "Makefile" ! -iname "README.md" ! -iname ".*" ! -name "bin" ! -iname "nvim" \) | sed 's|./||')
|
2015-03-26 13:26:05 -04:00
|
|
|
|
2017-08-31 00:19:46 -04:00
|
|
|
.PHONY: $(symlinks) nvim
|
2015-03-26 13:26:05 -04:00
|
|
|
|
|
|
|
all: install
|
|
|
|
|
2021-03-31 23:31:05 -04:00
|
|
|
install: install-bin plug-vim $(symlinks)
|
|
|
|
|
|
|
|
install-bin:
|
|
|
|
mkdir -p $$HOME/bin
|
|
|
|
cp bin/* $$HOME/bin
|
2015-12-10 10:55:01 -05:00
|
|
|
|
2017-08-31 00:19:46 -04:00
|
|
|
nvim:
|
|
|
|
mkdir -p ~/.config/nvim
|
|
|
|
cp nvim/init.vim ~/.config/nvim/
|
|
|
|
|
2016-08-13 16:06:49 -04:00
|
|
|
plug-vim:
|
2017-08-31 00:19:46 -04:00
|
|
|
if test ! -f ~/.vim/autoload/plug.vim ; then \
|
2016-08-13 16:06:49 -04:00
|
|
|
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
|
|
|
|
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim ; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
rbenv: rbenv-base rbenv-build
|
|
|
|
|
|
|
|
rbenv-base:
|
|
|
|
if test ! -d ~/.rbenv ; then \
|
|
|
|
git clone https://github.com/rbenv/rbenv.git ~/.rbenv ; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
rbenv-build:
|
|
|
|
if test ! -d ~/.rbenv/plugins/ruby-build ; then \
|
|
|
|
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build ; \
|
2015-12-10 16:17:09 -05:00
|
|
|
fi
|
2015-03-26 13:26:05 -04:00
|
|
|
|
|
|
|
$(symlinks):
|
|
|
|
test -e `pwd`/$@ \
|
|
|
|
&& ln -sfn `pwd`/$@ ~/.$@
|
|
|
|
|
|
|
|
update: update-repo $(symlinks)
|
|
|
|
|
|
|
|
update-repo:
|
|
|
|
git pull --rebase
|
|
|
|
git submodule update
|
|
|
|
|
|
|
|
clean:
|
|
|
|
for file in $(symlinks); do rm ~/.$$file; done
|