my shell and tool configurations
1YELLOW = $$(tput setaf 226)
2GREEN = $$(tput setaf 46)
3RED = $$(tput setaf 196)
4RESET = $$(tput sgr0)
5
6ifeq ($(OS),Windows_NT)
7 UNAME = Windows
8else
9 UNAME_S := $(shell uname -s)
10 ifeq ($(UNAME_S),Linux)
11 UNAME = Linux
12 endif
13 UNAME ?= Other
14endif
15
16install:
17 @make $(UNAME)
18
19Linux: bash bin byobu fish git gnupg mutt nvim vim weechat
20Windows: bash git vim
21Other: bash git vim
22
23clean:
24 @printf "$(RED)--- clean -----------------------------------------------\n$(RESET)"
25 stow -t "$$HOME" -D bash
26 stow -t "$$HOME" -D bin
27 stow -t "$$HOME" -D byobu
28 stow -t "$$HOME" -D fish
29 stow -t "$$HOME" -D git
30 stow -t "$$HOME" -D gnupg
31 stow -t "$$HOME" -D mutt
32 stow -t "$$HOME" -D nvim
33 stow -t "$$HOME" -D vim
34 stow -t "$$HOME" -D weechat
35
36bash:
37 @printf "$(YELLOW)--- bash -----------------------------------------------\n$(RESET)"
38 stow -t "$$HOME" bash
39
40bin:
41 @printf "$(YELLOW)--- bin ------------------------------------------------\n$(RESET)"
42 mkdir -p "$$HOME/bin"
43 stow -t "$$HOME" bin
44
45byobu:
46 @printf "$(YELLOW)--- byobu ----------------------------------------------\n$(RESET)"
47 stow -t "$$HOME" byobu
48
49fish:
50 @printf "$(YELLOW)--- fish -----------------------------------------------\n$(RESET)"
51 stow -t "$$HOME" fish
52
53git:
54 @printf "$(YELLOW)--- git ------------------------------------------------\n$(RESET)"
55 stow -t "$$HOME" git
56
57gnupg:
58 @printf "$(YELLOW)--- gnupg ----------------------------------------------\n$(RESET)"
59 mkdir -p "$$HOME/.gnupg"
60 chmod 700 "$$HOME/.gnupg"
61 stow -t "$$HOME" gnupg
62
63mutt:
64 @printf "$(YELLOW)--- mutt -----------------------------------------------\n$(RESET)"
65 stow -t "$$HOME" mutt
66
67nvim:
68 @printf "$(YELLOW)--- nvim -----------------------------------------------\n$(RESET)"
69 stow -t "$$HOME" nvim
70
71vim:
72 @printf "$(YELLOW)--- vim ------------------------------------------------\n$(RESET)"
73 mkdir -p ~/.vim/{undodir,swap,backup}
74 chmod 700 ~/.vim/{undodir,swap,backup}
75 git submodule update --remote --init -- vim/.vim/pack/plugins
76 stow -t "$$HOME" vim
77
78weechat:
79 @printf "$(YELLOW)--- weechat --------------------------------------------\n$(RESET)"
80 stow -t "$$HOME" weechat
81
82nuke:
83 @printf "$(RED)--- nuking existing files ------------------------------\n$(RESET)"
84 rm -rf ~/.byobu ~/.config/fish ~/.fzf ~/.bash*
85
86.PHONY: bash fish git vim nvim mutt byobu weechat gnupg bin clean install nuke Windows Linux Other