-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (52 loc) · 2 KB
/
Makefile
File metadata and controls
61 lines (52 loc) · 2 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
RUBY=/usr/bin/ruby
ZSH_PATH=$(shell which zsh)
define GITCONFIG
[include]
path = ~/dotfiles/.gitconfig
endef
export GITCONFIG
.PHONY: install homebrew_install fetch_dotfiles setup_vim setup_zsh setup_git setup_ssh
install:
$(MAKE) homebrew_install
[ -s ~/.ssh/id_rsa.pub ] || $(MAKE) setup_ssh
$(MAKE) setup_git
$(MAKE) fetch_dotfiles
$(MAKE) setup_zsh
$(MAKE) setup_tmux
$(MAKE) setup_vim
homebrew_install:
# homebrew install
which brew || $(RUBY) -e "$$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# homebrew tools install
brew install vim zsh git tmux gnu-sed jq
fetch_dotfiles:
# fetch_dotfiles
[ -d ~/dotfiles ] || git clone git@github.com:ShuzoN/dotfiles.git
setup_vim:
$(MAKE) fetch_dotfiles
echo "source ~/dotfiles/.vimrc" > ~/.vimrc
# install neo bundle
curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh > install.sh
sh ./install.sh
rm ./install.sh
@echo "please exec vim & install bundles!!!"
setup_zsh:
cat ~/.zshrc | grep "source ~/dotfiles/.zshrc" || echo "source ~/dotfiles/.zshrc" >> ~/.zshrc
brew install hub
mkdir -p ~/dotfiles/zaw
[ -d ~/dotfiles/zaw ] || git clone git@github.com:zsh-users/zaw.git ~/dotfiles/zaw
rm -fr ~/.zcompdump
cat /etc/shells | grep "$(ZSH_PATH)" || (sudo echo "$(ZSH_PATH)" | sudo tee -a /etc/shells; chsh -s $(ZSH_PATH))
@echo "please reboot your shell"
setup_git:
which xcode-select || xcode-select --install
test -s ~/.gitconfig || echo "$$GITCONFIG" >> ~/.gitconfig
[ -d ~/dotfiles/vim/.vim/bundle/vim-colors-solarized ] || git clone git://github.com/altercation/vim-colors-solarized.git ~/dotfiles/vim/.vim/bundle/vim-colors-solarized
setup_ssh:
[ -s ~/.ssh/id_rsa.pub ] || ssh-keygen
cat ~/.ssh/id_rsa.pub
@echo "\n please register ssh key to your github account: https://github.com/settings/keys"
@echo " and you setup ssh-key, exec 'make install' again"
setup_tmux:
brew install reattach-to-user-namespace
[ -s ~/.tmux.conf ] || echo "source ~/dotfiles/.tmux.conf" > ~/.tmux.conf