Added makefile for deployment, removed bootstrap.sh

This commit is contained in:
Christian Busch 2016-04-18 10:31:05 +02:00
parent d316a1bcaf
commit ee1e83b56b
2 changed files with 35 additions and 8 deletions

35
Makefile Normal file
View File

@ -0,0 +1,35 @@
DOTPATH := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
CANDIDATES := $(wildcard .??*)
EXCLUSIONS := .DS_Store .git .gitmodules .gitignore init
DOTFILES := $(filter-out $(EXCLUSIONS), $(CANDIDATES))
all: install
help:
@echo "make list #=> Show dot files in this repo"
@echo "make deploy #=> Create symlink to home directory"
@echo "make update #=> Fetch changes for this repo"
@echo "make install #=> Run make update, deploy, init"
@echo "make clean #=> Remove the dot files and this repo"
list:
@$(foreach val, $(DOTFILES), /bin/ls -dF $(val);)
deploy:
@echo '==> Start to deploy dotfiles to home directory.'
@echo ''
@$(foreach val, $(DOTFILES), ln -sfnv $(abspath $(val)) $(HOME)/$(val);)
update:
git pull origin master
git submodule init
git submodule update
git submodule foreach git pull origin master
install: update deploy
@exec $$SHELL
clean:
@echo 'Remove dot files in your home directory...'
@-$(foreach val, $(DOTFILES), rm -vrf $(HOME)/$(val);)
-rm -rf $(DOTPATH)

View File

@ -1,8 +0,0 @@
#!/bin/sh
git pull origin master
git submodule update --init
cp init/Smyck-Color-Scheme/smyck.vim .vim/colors/smyck.vim
rsync --exclude ".git/" --exclude ".DS_Store" --exclude "bootstrap.sh" \
--exclude "README.md" --exclude "init/" -avh --no-perms . ~