Last active
September 1, 2019 12:42
-
-
Save seanpianka/f51d5704ea3cee23db0dd52977a84be1 to your computer and use it in GitHub Desktop.
Bash script to install everything needed for my Mac, save my configuration files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SPECTACLE_VERSION="1.2" | |
RDM_VERSION="2.2" | |
install_brew=false | |
install_utils=true | |
install_dev_tools=true | |
install_webdev_tools=true | |
install_spectacle=true | |
install_rdm=true | |
install_vundle=true | |
install_iterm2=true | |
install_zsh=true | |
install_chrome=true | |
install_slack=true | |
install_discord=true | |
# Install macOS's missing package manager, brew | |
if [ "$install_brew" = true ]; then | |
echo "Installing the package manager Brew..." | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update | |
brew tap caskroom/cask | |
fi | |
# Install the essential core tools used in linux cli environments. | |
if [ "$install_utils" = true ]; then | |
echo "Installing GNU replacements for macOS utilities..." | |
brew install findutils \ | |
gnu-sed \ | |
gnu-tar \ | |
gnu-which \ | |
gnutls \ | |
grep \ | |
coreutils \ | |
binutils \ | |
diffutils \ | |
gzip \ | |
watch \ | |
tmux \ | |
wget \ | |
nmap \ | |
gpg \ | |
htop \ | |
tree \ | |
git | |
fi | |
if [ "$install_dev_tools" = true ]; then | |
echo "Installing linux development tools..." | |
brew tap homebrew/science | |
brew install mysql \ | |
postgresql \ | |
go \ | |
ffmpeg \ | |
opencv \ | |
docker \ | |
docker-machine \ | |
python \ | |
aws-cli | |
brew install vim --with-lua --with-python3 --with-client-server --override-system-vi --with-tcl | |
brew cask install pycharm | |
pip install --upgrade setuptools | |
pip install --upgrade pip | |
pip install virtualenv virtualenvwrapper black | |
fi | |
if [ "$install_webdev_tools" = true ]; then | |
echo "Installing web development tools..." | |
brew tap homebrew/science | |
brew install yarn \ | |
node \ | |
vue-cli | |
brew cask install webstorm | |
fi | |
# Install utility to provide far more window snapping controls than default. | |
if [ "$install_spectacle" = true ]; then | |
echo "Installing Spectacle $SPECTACLE_VERSION..." | |
wget "https://github.com/eczarny/spectacle/archive/$SPECTACLE_VERSION.tar.gz" | |
fi | |
# Install utility to precisely control the resolution of the laptop's display. | |
if [ "$install_rdm" = true ]; then | |
echo "Installing RDM $RDM_VERSION..." | |
wget "http://avi.alkalay.net/software/RDM/RDM-$RDM_VERSION.pkg" | |
sudo installer -package "/Volumes/RDM\ $RDM_VERSION/RDM-$RDM_VERSION.pkg" | |
fi | |
if [ "$install_fancontrol" = true ]; then | |
echo "Downloading Mac Fans Control..." | |
wget "https://github.com/crystalidea/macs-fan-control/releases/download/v1.4.12/macsfancontrol.zip" | |
unzip macsfancontrol.zip | |
fi | |
# Install vim and default package manager | |
if [ "$install_vundle" = true ]; then | |
echo "Installing .vimrc..." | |
wget https://gist.githubusercontent.com/seanpianka/7a73c5c98e62a9f5d2014df4cd568f3b/raw/.vimrc | |
echo "Installing vundle:latest..." | |
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim | |
vim +PluginInstall +qall | |
fi | |
# Install a better replacement for the default terminal | |
if [ "$install_iterm2" = true ]; then | |
echo "Installing iterm2:latest..." | |
brew cask install --appdir="/Applications" iterm2 | |
fi | |
# Install a more capable shell | |
if [ "$install_zsh" = true ]; then | |
echo "Installing zsh:latest..." | |
brew install zsh zsh-completions | |
echo "Installing oh-my-zsh:latest..." | |
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" "" --unattended | |
mv ~/.zshrc.pre-oh-my-zsh ~/.zshrc | |
brew install zsh-syntax-highlighting | |
fi | |
if [ "$install_chrome" = true ]; then | |
echo "Installing google chrome..." | |
brew cask install --appdir="/Applications" google-chrome | |
fi | |
if [ "$install_slack" = true ]; then | |
echo "Installing slack..." | |
brew cask install --appdir="/Applications" slack | |
fi | |
if [ "$install_discord" = true ]; then | |
echo "Installing discord..." | |
brew cask install --appdir="/Applications" discord | |
fi | |
if [ "$install_spotify" = true ]; then | |
echo "Installing spotify..." | |
brew cask install --appdir="/Applications" spotify | |
brew cask install --appdir="/Applications" spotify-notifications | |
fi | |
echo "Cleaning up..." | |
brew cleanup --force | |
rm -f -r /Library/Caches/Homebrew/* | |
chsh -s $(which zsh) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment