-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (30 loc) · 937 Bytes
/
Makefile
File metadata and controls
37 lines (30 loc) · 937 Bytes
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
RM = /bin/rm -rfv
LN = /bin/ln -fs
CP = /bin/cp -r
all:
@echo ""
@echo "usage:"
@echo ""
@echo "* make install -- to install dotfiles"
@echo "* make update -- get latest version from github, install manually"
@echo ""
install: install-bash install-git
install-bash:
$(RM) ~/.bash_profile ~/.bashrc ~/.bashrc.d ~/.zshrc
$(LN) $(realpath dotfiles/bash_profile) ~/.bash_profile
$(LN) $(realpath dotfiles/bashrc) ~/.bashrc
$(LN) $(realpath dotfiles/bashrc.d) ~/.bashrc.d
$(LN) $(realpath dotfiles/zshrc) ~/.zshrc
install-git:
$(RM) ~/.gitconfig ~/.gitignore_global
$(LN) $(realpath dotfiles/gitconfig) ~/.gitconfig
$(LN) $(realpath dotfiles/gitignore_global) ~/.gitignore_global
touch ~/.gitconfig_local
for SOURCE in $(realpath git_commands)/*; do \
TARGET="/usr/local/bin/git-$$(basename $$SOURCE)"; \
$(RM) $$TARGET; \
$(LN) $$SOURCE $$TARGET; \
done
update:
git pull --verbose
.PHONY: all install update