From: Samir Benmendil Date: Fri, 18 Jan 2013 18:10:12 +0000 (+0100) Subject: add .config support X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/597f492caf7440699e8da0ae5bdef6499d3b2f2c add .config support --- diff --git a/Makefile b/Makefile index b6b32c4..cfbb170 100644 --- 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/$@