-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
96 lines (75 loc) · 2.12 KB
/
Copy pathMakefile
File metadata and controls
96 lines (75 loc) · 2.12 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
DOTFILES_DIR := $(shell echo $(HOME)/dot-config)
SHELL := /bin/sh
UNAME := $(shell uname -s)
USER := $(shell whoami)
ifeq ($(UNAME), Darwin)
OS := macos
else ifeq ($(UNAME), Linux)
OS := linux
endif
.PHONY: all install
all: install
install: $(OS)
.PHONY: help usage
.SILENT: help usage
help: usage
usage:
printf "\\n\
\\033[1mdot-config\\033[0m\\n\
\\n\
Custom macOS settings and terminal configurations.\\n\
See README.md for detailed usage information.\\n\
\\n\
\\033[1mUSAGE:\\033[0m make [target]\\n\
\\n\
make Install all configurations and applications.\\n\
\\n\
make link Symlink only Bash configurations to the home directory.\\n\
\\n\
make unlink Remove symlinks created by \`make link\`.\\n\
\\n\
"
.PHONY: linux macos link unlink
linux: apt stow
. $(HOME)/.bash_profile
macos: bash brew consolas eslint stow emacs
bash $(DOTFILES_DIR)/macos/defaults.sh
stow macos
. $(HOME)/.bash_profile
link:
ln -fs $(DOTFILES_DIR)/bash/.bash_profile $(HOME)/.bash_profile
ln -fs $(DOTFILES_DIR)/bash/.bashrc $(HOME)/.bashrc
ln -fs $(DOTFILES_DIR)/bash/.inputrc $(HOME)/.inputrc
unlink:
unlink $(HOME)/.bash_profile
unlink $(HOME)/.bashrc
unlink $(HOME)/.inputrc
@printf "\\033[32m✓\\033[0m Symlinks removed. Manually remove ~/dot-config directory if needed.\\n"
.PHONY: apt bash brew stow consolas emacs npm eslint
apt:
bash $(DOTFILES_DIR)/linux/apt.sh
bash: brew
echo /usr/local/bin/bash | sudo tee -a /etc/shells
chsh -s /usr/local/bin/bash
brew:
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install | /usr/bin/ruby
brew bundle --file=$(DOTFILES_DIR)/macos/.Brewfile
consolas:
cd `mktemp -d -t consolas`; \
curl -LO https://sourceforge.net/projects/mscorefonts2/files/cabs/PowerPointViewer.exe; \
cabextract PowerPointViewer.exe; \
cabextract ppviewer.cab; \
open CONSOLA*.TTF;
emacs:
mkdir -p $(HOME)/.emacs.d
stow emacs
npm:
mkdir -p $(HOME)/.npm-packages
eslint: npm
npm install -g eslint eslint-config-google eslint-plugin-html
stow:
mkdir -p $(HOME)/bin $(HOME)/Documents
stow bash
stow git
stow npm
stow doc