2017-11-21 02:39:58 +00:00
|
|
|
#!/bin/bash
|
2017-05-01 08:22:20 +00:00
|
|
|
|
|
|
|
if which tput >/dev/null 2>&1; then
|
|
|
|
ncolors=$(tput colors)
|
|
|
|
fi
|
|
|
|
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
|
|
|
|
RED="$(tput setaf 1)"
|
|
|
|
GREEN="$(tput setaf 2)"
|
|
|
|
YELLOW="$(tput setaf 3)"
|
|
|
|
BLUE="$(tput setaf 4)"
|
|
|
|
BOLD="$(tput bold)"
|
|
|
|
NORMAL="$(tput sgr0)"
|
|
|
|
else
|
|
|
|
RED=""
|
|
|
|
GREEN=""
|
|
|
|
YELLOW=""
|
|
|
|
BLUE=""
|
|
|
|
BOLD=""
|
|
|
|
NORMAL=""
|
|
|
|
fi
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2017-05-02 22:00:39 +00:00
|
|
|
printf "Installing env...\n"
|
|
|
|
ln -sf $HOME/.dotfiles/osx/env.platform $HOME/.env.platform
|
|
|
|
|
|
|
|
printf "Installing git customizations...\n"
|
|
|
|
ln -sf $HOME/.dotfiles/osx/gitconfig.platform $HOME/.gitconfig.platform
|
|
|
|
|
2017-05-02 21:39:28 +00:00
|
|
|
brew tap homebrew/core
|
|
|
|
|
|
|
|
printf "Installing xquartz..."
|
2017-11-21 02:39:58 +00:00
|
|
|
#brew cask install xquartz
|
2017-05-02 21:39:28 +00:00
|
|
|
|
2017-05-01 08:22:20 +00:00
|
|
|
brew_packages=(
|
|
|
|
'tree'
|
2017-05-02 21:39:28 +00:00
|
|
|
'openssl'
|
2017-11-21 04:08:51 +00:00
|
|
|
'git'
|
2017-11-21 02:39:58 +00:00
|
|
|
# 'xclip'
|
2017-05-02 21:39:28 +00:00
|
|
|
'rlwrap'
|
|
|
|
'cmake'
|
2017-06-12 11:23:58 +00:00
|
|
|
'pkg-config'
|
2017-11-21 02:39:58 +00:00
|
|
|
'vim'
|
2017-12-19 21:10:08 +00:00
|
|
|
'the_silver_searcher'
|
2018-01-22 00:04:20 +00:00
|
|
|
'selecta'
|
2017-11-21 02:39:58 +00:00
|
|
|
# 'rust'
|
|
|
|
# 'go'
|
2017-06-12 11:23:58 +00:00
|
|
|
'sdl')
|
2017-05-01 08:22:20 +00:00
|
|
|
|
|
|
|
for package in "${brew_packages[@]}"
|
|
|
|
do
|
|
|
|
printf "Installing $package..."
|
|
|
|
ret=$(brew list | awk /$package/)
|
2017-05-02 21:39:28 +00:00
|
|
|
if [[ $ret == $package ]]; then
|
2017-05-01 08:22:20 +00:00
|
|
|
printf "${YELLOW}already installed!${NORMAL}\n"
|
|
|
|
else
|
|
|
|
eval "brew install $package"
|
|
|
|
printf \n
|
|
|
|
fi
|
|
|
|
done
|
2017-05-02 22:14:36 +00:00
|
|
|
|
|
|
|
printf "\n${YELLOW}Now you must install Xcode.${NORMAL}\n"
|
|
|
|
printf "Open the App Store and install the software.\n"
|
|
|
|
printf "When that finishes open a terminal and run the following:\n"
|
|
|
|
printf " 1. ${YELLOW}sudo xcode-select --install${NORMAL}\n"
|
|
|
|
printf " 2. ${YELLOW}sudo xcodebuild -license${NORMAL}\n"
|
|
|
|
printf " 3. ${YELLOW}sudo xcode-select -s /Applications/Xcode.app/Contents/Developer${NORMAL}\n"
|
|
|
|
|
|
|
|
printf "\n${BOLD}Finished setting up OS X${NORMAL}\n"
|