-
Notifications
You must be signed in to change notification settings - Fork 1
/
workstation.sh
executable file
·88 lines (77 loc) · 2 KB
/
workstation.sh
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
#!/bin/bash
# TODO check if things are installed first
# TODO run vim-update on startup
# TODO run bash-it update on startup
# TODO run brew update && brew upgrade on startup
# TODO check for errors and print error messages
# TODO look into installing the following
# - shiftit
# - flycut
# - soundflower
# - LineIn
# - ...
set -e
## INSTALL BREW
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew upgrade
## Cask
brew upgrade brew-cask
brew cask install iterm2 google-chrome firefox
## BASH
# update Preferences to include `Command: /usr/local/bin/bash --login`
brew install bash
echo $HOME/.bashrc << EOF
export EDITOR=vim
EOF
## GIT
brew instal git
echo $HOME/.gitconfig << EOF
[user]
email = corbin.halliwill@gmail.com
name = Corbin Halliwill
[alias]
st = status
co = checkout
ci = commit
EOF
## OTHER TOOLS
brew install python
brew install direnv
echo 'eval "$(direnv hook bash)"' >> $HOME/.bashrc
brew install csshx
brew install ag
brew install tree
brew install htop
brew install z
echo '. `brew --prefix`/etc/profile.d/z.sh' >> ~/.bashrc
## BASHIT (install and move autocomplete files)
git clone --depth=1 https://github.com/Bash-it/bash-it.git $HOME/.bash_it
yes | $HOME/.bash_it/install.sh
echo $HOME/.bash_profile << EOF
# Source .bashrc and .bash_profile
if [ -f $HOME/.bashrc ]; then
source $HOME/.bashrc
fi
EOF
bash-it enable completion git brew
## GO
brew install go
mkdir -p $HOME/go/bin $HOME/go/src $HOME/go/pkg
pushd $HOME/go
echo export GOPATH=$HOME/go > .envrc
echo export PATH=$HOME/go/bin:$PATH >> .envrc
GOPATH=$HOME/go go get -u github.com/onsi/ginkgo/ginkgo
GOPATH=$HOME/go go get -u github.com/FiloSottile/gvt
popd
## VIM
brew uninstall ctags
brew tap universal-ctags/universal-ctags
brew instal universal-ctags --HEAD
brew install python3
brew install vim --with-lua --with-python3
curl vimfiles.luan.sh/install | FORCE=1 bash
vim-update
vim-update
## Cleanup
brew cleanup && brew cask cleanup