X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/a2232eed703e1caa3fa7d5ff495dd6e1a0ff550b..d3bdd28f491728d969c5941d18b9f4ee2651f60b:/Makefile diff --git a/Makefile b/Makefile index 92acff6..0344649 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ APATH := $(realpath .) -RPATH := $(subst $(wildcard ~/),,$(APATH)) FILES := bin -DOTFILES := aliases bash* conky* flexget vim* xbindkeysrc Xmodmap zsh* +DOTFILES := conky* git* goobookrc msmtp* mutt ncmpcpp profile weechat xbindkeysrc Xresources xprofile zprofile zshrc +CONFIGFILES := aliases compton.conf git mimeo.conf mpd offlineimap ranger retroarch vim xkb zsh -.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/$@