-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (58 loc) · 2.1 KB
/
Makefile
File metadata and controls
71 lines (58 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
## -*- mode: makefile-gmake -*-
OS:=$(shell uname -s)
dot:=$(CURDIR)
bin:=$(dot)/bin
tmp:=/tmp
help:
@echo "Usage: make [OPTION]"
@echo "Makefile to configure user environment."
@echo ""
@echo " make install configure entire ~/. directory"
@echo " make symlinks sync config files, en masse and platform specific"
@echo " make scripts sync ~/bin and its scripts"
@echo " make help display this message"
@echo ""
install: symlinks scripts
symlinks-common: ackrc bash-aliases bash_profile bashrc \
fasdrc flake8rc ghci git-aliases gitconfig gitignore_global inputrc \
profile psqlrc sbclrc tmux.conf
@echo "Symlinking common config files..."
@for file in $^; do ln -fs $(dot)/$$file ~/.$$file; done
@ln -fns $(dot)/tmux.d ~/.tmux.d
symlinks-nix:
@echo "Symlinking nix config file..."
@mkdir -p ~/.config/nix/
@ln -fns $(dot)/nix.conf ~/.config/nix/nix.conf;
symlinks-linux: conkyrc-xmonad dunstrc inputrc xinitrc Xdefaults
@echo "Symlinking Linux specific config files..."
@for file in $^; do ln -fs $(dot)/$$file ~/.$$file; done
symlinks-osx: osx
@echo "Symlinking OS X specific config files..."
@for file in $^; do ln -fs $(dot)/$$file ~/.$$file; done
mpd-config: mpd.log mpd.db mpd.pid mpd.state
@echo "Configuring mpd..."
@mkdir -p ~/.mpd
@mkdir -p ~/.mpd/playlists
@mkdir -p ~/.ncmpcpp
@mkdir -p ~/.mpdscribble
@ln -fs $(dot)/mpd ~/.mpd/mpd.conf
@ln -fs $(dot)/ncmpcpp ~/.ncmpcpp/config
@ln -fs $(dot)/ncmpcpp_bindings ~/.ncmpcpp/bindings
@ln -fs $(dot)/mpdscribble ~/.mpdscribble/mpdscribble.conf
@for file in $^; do touch ~/.mpd/$$file; done
@echo "Ensure your last.fm credentials are in mpdscribble.conf..."
vim-config:
@echo "Configuring vim..."
@ln -fns $(dot)/vim ~/.vim;
@ln -fs $(dot)/vimrc ~/.vimrc
@git -C $(dot) submodule update --init
ifeq ($(OS),Darwin)
symlinks: symlinks-common symlinks-nix symlinks-osx mpd-config vim-config
else
symlinks: symlinks-common symlinks-nix symlinks-linux mpd-config vim-config
endif
link-scripts:
@if [ -d ~/bin ]; then rm -rf ~/bin; fi;
@mkdir ~/bin
@ln -s $(dot)/bin/* ~/bin/
scripts: link-scripts