Skip to content

Commit

Permalink
Refactor the make install with wildcard function
Browse files Browse the repository at this point in the history
  • Loading branch information
chusiang committed Mar 19, 2018
1 parent ec21af8 commit f79ebf5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ FILE_VIMRC=${HOME}/.vimrc
FILE_GVIMRC=${HOME}/.gvimrc
DIR_VIM=${HOME}/.vim
DIR_VIM_BAK=${HOME}/.vim.bak-${TIMESTAMP}
DEIN_TARGET=~/.vim/bundle/repos/github.com/Shougo/dein.vim

main: update

Expand All @@ -35,9 +36,12 @@ install:
cp -a _vim/ ${DIR_VIM}

@echo '==> Install dein.vim ...'
curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > dein_installer.sh
sh ./dein_installer.sh ${DIR_VIM}/bundle/
rm -f dein_installer.sh
ifneq ("$(wildcard ${DEIN_TARGET})","")
# Target of "${DEIN_TARGET}" is exist, ignore ...
else
mkdir -p ${DEIN_TARGET}
git clone https://github.com/Shougo/dein.vim ${DEIN_TARGET}
endif

@echo '==> Install plugins ...'
vim -c "try | call dein#install() | finally | qall! | endtry" -Ne
Expand Down

0 comments on commit f79ebf5

Please sign in to comment.