X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/295ba2cb7f52a170d0daab1ce337be3f040597b0..2983793fb38ae06dface67c895bf85ff37a7a05c:/Makefile diff --git a/Makefile b/Makefile index 306bd97..790826f 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ APATH := $(realpath .) -RPATH := $(subst $(wildcard ~/),,$(APATH)) FILES := bin -DOTFILES := aliasesrc bash* conkyrc flexget vim* zsh* +DOTFILES := aliases bash* conky* flexget git* goobookrc msmtp* mutt ncmpcpp offlineimap* vim* weechat xbindkeysrc Xmodmap Xresources xprofile zsh* +CONFIGFILES := retroarch compton.conf mimeo.conf -.PHONY: install $(FILES) $(DOTFILES) -install: $(FILES) $(DOTFILES) +.PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES) +install: $(FILES) $(DOTFILES) $(CONFIGFILES) $(FILES): @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \ @@ -16,7 +16,7 @@ $(FILES): fi; \ rm -r ~/$@; \ fi; - ln -sfT $(RPATH)/$@ ~/$@ + ln -sfT $(APATH)/$@ ~/$@ $(DOTFILES): @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \ @@ -27,4 +27,15 @@ $(DOTFILES): fi; \ rm -r ~/.$@; \ fi; - ln -sfT $(RPATH)/$@ ~/.$@ + ln -sfT $(APATH)/$@ ~/.$@ + +$(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 $(APATH)/$@ ~/.config/$@