]> git.rmz.io Git - dotfiles.git/blobdiff - Makefile
add .config support
[dotfiles.git] / Makefile
index b6b32c48bed898c888c9f9763f9e2a194e0053b1..cfbb170f0724598fb0e04a3265d67b6c97b6d9a8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,10 @@ RPATH := $(subst $(wildcard ~/),,$(APATH))
 
 FILES := bin
 DOTFILES := aliases bash* conky* flexget git* vim* xbindkeysrc Xmodmap zsh*
+CONFIGFILES := retroarch
 
-.PHONY: install $(FILES) $(DOTFILES)
-install: $(FILES) $(DOTFILES)
+.PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES)
+install: $(FILES) $(DOTFILES) $(CONFIGFILES)
 
 $(FILES): 
        @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \
@@ -28,3 +29,14 @@ $(DOTFILES):
            rm -r ~/.$@; \
        fi; 
        ln -sfT $(RPATH)/$@ ~/.$@
+
+$(CONFIGFILES): 
+       @if [[ -e ~/.config/$@ && ! -L ~/.config/$@ ]]; then \
+           if [[ -d .config/$@ ]]; then \
+             cp -r ~/.config/$@/* $@; \
+           else \
+             cp -r ~/.config/$@ $@; \
+           fi; \
+           rm -r ~/.config/$@; \
+       fi; 
+       ln -sfT $(RPATH)/$@ ~/.config/$@