Rewrote mac install script

This commit is contained in:
Henrik Lissner 2013-11-30 12:50:00 -05:00
parent f0978ad961
commit 07dd7afffa
3 changed files with 58 additions and 45 deletions

View file

@ -2,36 +2,80 @@
source ~/.dotfiles/zsh/functions
BASEDIR=$(dirname "$0")
if ! is_mac; then
echo_r "==> Mac: Aborting. This isn't a mac!"
echo_r "==> Aborting. This isn't a mac!"
exit 1
fi
if [ ! -d /usr/local/Cellar ]; then
echo_g "==> Mac: Installing homebrew"
keep_alive
ln -sf ~/.dotfiles/zsh ~/.zsh
ln -sf ~/.dotfiles/zshrc ~/.zshrc
ln -sf ~/.dotfiles/zshenv ~/.zshenv
if ! command_exists brew; then
echo_g "==> Installing homebrew"
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
echo_g "==> Mac: Done! Don't forget to install the Command Line Tools in XCode"
echo_g "==> Accept xcode agreement"
sudo xcodebuild -license
echo_g "==> Done! Please run this again (don't forget to do brew doctor first)"
else
echo_g "==> Mac: Installing basic brews"
brew tap homebrew/dupes
echo_g "==> Installing basic brews"
if ! brew tap | grep dupes >/dev/null; then
brew tap homebrew/dupes
fi
brew install wget curl git
brew install the_silver_search
brew install the_silver_searcher
brew install lua --with-completion
brew install macvim --devel --override-system-vim --with-lua
# brew install vim --override-system-vi --with-lua --with-perl
brew tap phinze/homebrew-cask
brew install brew-cask
if ! brew list | grep brew-cask >/dev/null; then
echo_g "==> Installing brew cask"
brew tap phinze/homebrew-cask
brew install brew-cask
else
echo_g "==> Cask already installed!"
fi
while [ $# -gt 0 ]; do
case "$1" in
"--essentials") $BASEDIR/macapps/essentials ;;
"--home") $BASEDIR/macapps/home ;;
"--basic")
echo_g "==> Installing basic bundle"
# Install the apps I find essential for every mac I'm on
# (that I don't get through the app store)
brew cask install app-cleaner
brew cask install google-chrome
brew cask install launch-bar
brew cask install dropbox
brew cask install iterm2
brew cask install sequel-pro
brew cask install transmission
brew cask install transmit
;;
"--dev")
echo_g "==> Installing dev bundle"
brew cask install codekit
brew cask install vagrant
;;
"--home")
echo_g "==> Installing home bundle"
brew cask install adium
brew cask install reggy
brew cask install net-news-wire
brew cask install soulver
brew cask install scrivener
brew cask install skype
brew cask install vlc
;;
esac
shift
done
echo_g "==> Mac: Done!"
echo_g "==> Done!"
fi

View file

@ -1,16 +0,0 @@
#!/usr/bin/zsh
echo-g "==> macapps/Essentials: Installing (you might have to run this more than once)..."
# Install the apps I find essential for every mac I'm on
# (that I don't get through the app store)
! app_exists "LaunchBar" && brew cask install launch-bar
! app_exists "Dropbox" && brew cask install dropbox
! app_exists "Google Chrome" && brew cask install google-chrome
! app_exists "AppCleaner" && brew cask install app-cleaner
! app_exists "iTerm" && brew cask install iterm2
! app_exists "Sequel Pro" && brew cask install sequel-pro
! app_exists "Transmission" && brew cask install transmission
! app_exists "Transmit" && brew cask install transmit
echo-g "==> macapps/Essentials: Done!"

View file

@ -1,15 +0,0 @@
#!/usr/bin/env zsh
echo-g "==> macapps/Home: Installing (you might have to run this more than once)..."
! app_exists "Adium" && brew cask install adium
! app_exists "CodeKit" && brew cask install codekit
! app_exists "Reggy" && brew cask install reggy
! app_exists "NetNewsWire" && brew cask install net-news-wire
! app_exists "Soulver" && brew cask install soulver
! app_exists "Scrivener" && brew cask install scrivener
! app_exists "Skype" && brew cask install skype
! app_exists "Vagrant" && brew cask install vagrant
! app_exists "VLC" && brew cask install vlc
echo-g "==> macapps/Home: Done!"