forked from mikeprivette/yanmss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·101 lines (79 loc) · 2.53 KB
/
setup.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
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/env bash
# Install command-line tools using Homebrew.
# Ask for the administrator password upfront.
sudo -v
# Keep-alive: update existing `sudo` time stamp until the script has finished.
while true; do
sudo -n true
sleep 60
kill -0 "$$" || exit
done 2>/dev/null &
# Setup Finder Commands
# Show Library Folder in Finder
chflags nohidden ~/Library
# Show Hidden Files in Finder
defaults write com.apple.finder AppleShowAllFiles YES
# Show Path Bar in Finder
defaults write com.apple.finder ShowPathbar -bool true
# Show Status Bar in Finder
defaults write com.apple.finder ShowStatusBar -bool true
# Check for Homebrew, and then install it
if test ! "$(which brew)"; then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Homebrew installed successfully"
else
echo "Homebrew already installed!"
fi
# Install XCode Command Line Tools
echo 'Checking to see if XCode Command Line Tools are installed...'
brew config
# Updating Homebrew.
echo "Updating Homebrew..."
brew update
# Upgrade any already-installed formulae.
echo "Upgrading Homebrew..."
brew upgrade
# Install iTerm2
echo "Installing iTerm2..."
brew cask install iterm2
# Update the Terminal
# Install oh-my-zsh
echo "Installing oh-my-zsh..."
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo "Need to logout now to start the new SHELL..."
logout
# Install Git
echo "Installing Git..."
brew install git
# Install Powerline fonts
echo "Installing Powerline fonts..."
git clone https://github.com/powerline/fonts.git
cd fonts || exit
sh -c ./install.sh
# Install ruby
if test ! "$(which ruby)"; then
echo "Installing Ruby..."
brew install ruby
echo "Adding the brew ruby path to shell config..."
echo 'export PATH='"/usr/local/opt/ruby/bin:$PATH" >>~/.bash_profile
else
echo "Ruby already installed!"
fi
# Install some CTF tools; see https://github.com/ctfs/write-ups.
brew install nmap
# Install other useful binaries.
brew install speedtest_cli
# Core casks
brew cask install --appdir="/Applications" alfred
# Development tool casks
brew cask install --appdir="/Applications" visual-studio-code
# Misc casks
brew cask install --appdir="/Applications" firefox
brew cask install --appdir="/Applications" slack
brew cask install --appdir="/Applications" 1password
brew cask install --appdir="/Applications" caffeine
# Remove outdated versions from the cellar.
echo "Running brew cleanup..."
brew cleanup
echo "You're done!"