From 597f492caf7440699e8da0ae5bdef6499d3b2f2c Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Fri, 18 Jan 2013 19:10:12 +0100 Subject: [PATCH] add .config support --- Makefile | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) 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/$@ -- 2.48.1