X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/352fe1c31a12484e932c323b44f05070c6076705..a06f433fb0135a5598c3b63d198af3792882032d:/Makefile diff --git a/Makefile b/Makefile index af701e0..a5116c4 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,14 @@ -.PHONY: install update +APATH := $(realpath .) +RPATH := $(subst $(wildcard ~/),,$(APATH)) -install: - cp -f bashrc ~/.bashrc - cp -f bash_aliases ~/.bash_aliases - cp -f bash_colors ~/.bash_colors - cp -f bash_logout ~/.bash_logout - cp -f flexget/config.yml ~/.flexget/config.yml - cp -f vimrc ~/.vimrc +EXCLUDES := Makefile +ALL := $(wildcard *) +FILES := $(filter-out $(EXCLUDES),$(ALL)) -update: - cp -f ~/.bashrc bashrc - cp -f ~/.bash_aliases bash_aliases - cp -f ~/.bash_colors bash_colors - cp -f ~/.bash_logout bash_logout - cp -f ~/.flexget/config.yml flexget/config.yml - cp -f ~/.vimrc vimrc +.PHONY: install $(FILES) +install: $(FILES) + +$(FILES): + cp -r ~/.$@ $@ + rm -r ~/.$@ + ln -sf $(RPATH)/$@ ~/.$@