-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
136 lines (112 loc) · 5.25 KB
/
Makefile
File metadata and controls
136 lines (112 loc) · 5.25 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
.PHONY: all
.SILENT: banner help packages
SHELL := /bin/bash
default: help
help: banner
grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
banner:
echo ""
echo " _| _| _|_| _| _| "
echo " _|_|_| _|_| _|_|_|_| _| _| _|_| _|_|_|"
echo " _| _| _| _| _| _|_|_|_| _| _| _|_|_|_| _|_| "
echo " _| _| _| _| _| _| _| _| _| _|_|"
echo " _|_|_| _|_| _|_| _| _| _| _|_|_| _|_|_| "
echo ""
# TODO venv: pip install virtualenvwrapper
# TODO byobu activate
# TODO scream about iterm prefs to Meslo Powerline font?
#
# TODO rebootstrap ~/.ssh/
# TODO rebootstrap ~/code/
# All the vim plugins to install
PLUGINS = \
https://github.com/altercation/vim-colors-solarized.git \
https://github.com/bling/vim-airline.git \
https://github.com/chase/vim-ansible-yaml.git \
https://github.com/elzr/vim-json.git \
https://github.com/gmarik/vundle.git \
https://github.com/hashivim/vim-packer.git \
https://github.com/hashivim/vim-vagrant.git \
https://github.com/jnurmine/Zenburn.git \
https://github.com/mhinz/vim-signify.git \
https://github.com/nathanaelkane/vim-indent-guides.git \
https://github.com/powerline/powerline.git \
https://github.com/scrooloose/nerdcommenter.git \
https://github.com/scrooloose/nerdtree.git \
https://github.com/scrooloose/syntastic.git \
https://github.com/tpope/vim-git.git \
https://github.com/tpope/vim-markdown.git \
https://github.com/tpope/vim-sensible.git \
https://github.com/vadv/vim-chef.git \
all: packages vpn bin ssh python vim zsh rvm link ## ALL THE THINGS
link: ## symlink all relevant dotfiles
ln -sf ~/.dotfiles/bashrc ~/.bashrc
ln -sf ~/.dotfiles/bash_profile ~/.bash_profile
ln -sf ~/.dotfiles/bash_prompt ~/.bash_prompt
ln -sf ~/.dotfiles/Brewfile ~/.Brewfile
ln -sf ~/.dotfiles/digrc ~/.digrc
ln -sf ~/.dotfiles/gemrc ~/.gemrc
ln -sf ~/.dotfiles/gitconfig ~/.gitconfig
ln -sf ~/.dotfiles/ruby-version ~/.ruby-version
ln -sf ~/.dotfiles/tmux.conf ~/.tmux.conf
ln -sf ~/.dotfiles/vimrc ~/.vimrc
ln -sf ~/.dotfiles/warprc ~/.warprc
ln -sf ~/.dotfiles/zshrc ~/.zshrc
# This assumes the above Brewfile
# http://robots.thoughtbot.com/brewfile-a-gemfile-but-for-homebrew
packages: ## Install homebrew, brew bundle install
# Check for git installed
# If not found, give snippets to install
if [ ! git ] ; then echo "I cannot find git in my $PATH! Install it? git --version ..." ; fi
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install | ruby
brew tap Homebrew/bundle
brew bundle
bin: ## Setup ~/bin
mkdir -p ~/bin
vim: ## Setup vimbundles
if [ ! -d ~/.vim/autoload ] ; then mkdir -p ~/.vim/autoload ; fi
if [ ! -d ~/.vim/bundle/ ] ; then mkdir -p ~/.vim/bundle/ ; fi
cd ~/.vim/bundle/ && $(foreach plugin,$(PLUGINS), git clone -q $(plugin) || true )
if [ ! -d /tmp/fonts ] ; then cd /tmp && git clone https://github.com/powerline/fonts.git && cd fonts && ./install.sh ; fi
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
brew-dump: ## True up your Brewfile for brew bundler
@rm Brewfile ; brew bundle dump
git-remote: ## Adjust this git remote from https to ssh
cd ~/.dotfiles && git remote -v && \
git remote set-url origin git@github.com:filler/dotfiles.git && \
git remote -v
osx-prefs: ## Set OS X preferences
@defaults write com.apple.finder CreateDesktop -bool false && \
defaults write com.apple.desktopservices DSDontWriteNetworkStores true && \
killall Finder
osx-update: osx-update-enable osx-update-list osx-update-install ## Apply Apple patches
osx-update-list: ## List all outstanding OS X updates
@softwareupdate --all --list
osx-update-install: ## Install all outstanding OS X updates
@softwareupdate --all --recommended --install
osx-update-enable: ## Enable automatic OS X updates
@echo "Checking into automatic update schedule ..."
@sudo softwareupdate --schedule
@echo "Enabling automatic update schedule ..."
@sudo softwareupdate --schedule on
python: ## Install python bits
pip install -r requirements.txt
rvm: ## Install rvm
ifeq (, $(shell which rvm))
curl -sSL https://get.rvm.io | bash
endif
ssh: ## Setup ssh subsystem
ifeq (, $(shell grep -q "^github.com" $(HOME)/.ssh/known_hosts))
$(shell ssh-keyscan github.com >> $(HOME)/.ssh/known_hosts)
endif
test: ## Test
docker pull koalaman/shellcheck:stable && \
docker run -v "$PWD:/mnt" koalaman/shellcheck *
vpn: ## Setup VPN bits
curl -LO 'https://vpn-nyc3.digitalocean.com/global-protect/msi/GlobalProtect.pkg'
sudo installer -verbose -pkg GlobalProtect.pkg -target /
zsh: ## Install oh-myzsh
if [ ! -d ~/.oh-my-zsh ] ; then curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh ; fi
dscl . -read /Users/$USER UserShell
sudo dscl . -create /Users/$USER UserShell /usr/local/bin/zsh
dscl . -read /Users/$USER UserShell