Advertisement
Guest User

Untitled

a guest
Jul 29th, 2014
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Make 1.04 KB | None | 0 0
  1. APATH := $(realpath .)
  2.  
  3. FILES := bin
  4. DOTFILES := conky* git* goobookrc msmtp* mutt ncmpcpp offlineimap* profile weechat xbindkeysrc Xresources xprofile zprofile zshrc
  5. CONFIGFILES := aliases compton.conf git mimeo.conf mpd retroarch vim xkb zsh
  6.  
  7. .PHONY: install $(FILES) $(DOTFILES) $(CONFIGFILES)
  8. install: $(FILES) $(DOTFILES) $(CONFIGFILES)
  9.  
  10. $(FILES):
  11.     @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \
  12.         if [[ -d $@ ]]; then \
  13.           cp -r ~/$@/* $@; \
  14.         else \
  15.           cp -r ~/$@ $@; \
  16.         fi; \
  17.         rm -r ~/$@; \
  18.     fi;
  19.     ln -sfT $(APATH)/$@ ~/$@
  20.  
  21. $(DOTFILES):
  22.     @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \
  23.         if [[ -d .$@ ]]; then \
  24.           cp -r ~/.$@/* $@; \
  25.         else \
  26.           cp -r ~/.$@ $@; \
  27.         fi; \
  28.         rm -r ~/.$@; \
  29.     fi;
  30.     ln -sfT $(APATH)/$@ ~/.$@
  31.  
  32. $(CONFIGFILES):
  33.     @if [[ -e ~/.config/$@ && ! -L ~/.config/$@ ]]; then \
  34.         if [[ -d .config/$@ ]]; then \
  35.           cp -r ~/.config/$@/* $@; \
  36.         else \
  37.           cp -r ~/.config/$@ $@; \
  38.         fi; \
  39.         rm -r ~/.config/$@; \
  40.     fi;
  41.     ln -sfT $(APATH)/$@ ~/.config/$@
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement