-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacshell.sh
executable file
·59 lines (42 loc) · 1.21 KB
/
macshell.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
#!/bin/sh
# Setup preferred shell environment on Mac
# Ask for sudo early
echo "Input password for sudo-enabled commands: "
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.macos` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
# Homebrew
if ! hash brew &> /dev/null; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
fi
sudo chown -R $(whoami) /usr/local/bin
# For removing kegs and their dependencies: brew rmtree FORMULA
brew tap beeftornado/rmtree
# Good ol' CLI tools
brew install tree
# Git
# Override Git with latest version
brew install git
brew link --overwrite git
sh git.sh
# SSH
sh ssh.sh
# ZSH
brew install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
## Fix for oh-my-zsh folder for .zshrc
mv $HOME/.oh-my-zsh $HOME/oh-my-zsh
# Commonly used casks
brew install --cask iterm2 flux rectangle
# JSON processing on the CLI
brew install jq
# Fast search
brew install ripgrep
# Github CLI
brew install hub
cp ./zsh/.zshrc ~/.zshrc
cp ./zsh/.zshenv ~/.zshenv
cp ./.vimrc ~/.vimrc
# Vim
brew install vim node yarn fzf
vim +PlugInstall +qall!