Skip to content

Commit

Permalink
setup: Adjusted for Yosemite
Browse files Browse the repository at this point in the history
  • Loading branch information
nixme committed Dec 11, 2014
1 parent babc06d commit 233c1bc
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 49 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ dotfiles
Fresh OS X box? Full machine setup including dotfiles:

```
curl https://raw.github.com/nixme/dotfiles/master/bin/setup-machine | sh
curl https://raw.githubusercontent.com/nixme/dotfiles/master/bin/setup-machine | bash
```

Existing box or Linux? Just install dotfiles:

```
curl https://raw.github.com/nixme/dotfiles/master/bin/install-dotfiles | sh
curl https://raw.githubusercontent.com/nixme/dotfiles/master/bin/install-dotfiles | bash
```

_(running random scripts off the internet is lame. thankfully they're my scripts. inspect first)_
110 changes: 63 additions & 47 deletions bin/setup-machine
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# Set up my preferred OS defaults, common programs, and general environment.
#
# OS X 10.8 Mountain Lion only for now.
# OS X 10.10 Yosemite only for now.
#
# Inspired by https://github.com/mathiasbynens/dotfiles/blob/master/.{osx,brew}
#
Expand All @@ -12,92 +12,108 @@
# - Xcode installed
# - Xcode CLI tools installed
# - Computer has been named via System Preferences > Sharing
# - Any applicable App Store Purchased apps should be installed too.

# Preauthorize with keep-alive.
sudo -v
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &

mkdir -p ~/.zsh
mkdir -p ~/Projects
mkdir -p ~/Applications


################################### HOMEBREW ###################################

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew install git tmux most tree readline chruby ruby-build nodejs \
reattach-to-user-namepsace ack the_silver_searcher \
aspell heroku-toolbelt

# Latest XCode CLI tools do not include regular GCC, only LLVM-GCC. So install
# gcc-4.2 based on Apple's latest sources.
# Add dupes so we can install newer GCC's and other basic unix tools that Apple
# never updates. Add versions so we can install old versions when needed.
brew tap homebrew/dupes
brew install apple-gcc42
brew tap homebrew/versions

# Install common CLI apps and daemons we always use.
brew install homebrew/versions/gcc49 git tmux most tree readline chruby \
ruby-install node ack the_silver_searcher aspell heroku-toolbelt \
hub curl postgresql redis memcached unrar
brew install reattach-to-user-namespace --wrap-pbcopy-and-pbpaste --wrap-launchctl
brew install ffmpeg --with-fdk-aac

# homebrew-cask for managing binary apps
brew install caskroom/cask/brew-cask
brew tap caskroom/versions
brew cask install firefox
brew cask install google-chrome
brew cask install google-chrome-canary
brew cask install google-drive
brew cask install dropbox
brew cask install skydrive
brew cask install microsoft-office
brew cask install iterm2
brew cask install rdio
brew cask install transmission
brew cask install github
brew cask install slack
brew cask install hipchat
brew cask install onepassword
brew cask install imageoptim
brew cask install imagealpha
brew cask install skype
brew cask install selfcontrol
brew cask install vlc
brew cask install shady
brew cask install beamer
brew cask install atom
brew cask install java
brew cask install steam
brew cask install origin
brew cask install totalfinder
brew cask install flux
brew cask install android-studio
brew cask install parallels-desktop
brew cask install vagrant
brew cask install vagrant-manager
vagrant plugin install vagrant-parallels


################################ ZSH & DOTFILES ################################

brew install --disable-etcdir zsh
$homebrew_zsh=/usr/local/bin/zsh
homebrew_zsh=/usr/local/bin/zsh
echo $homebrew_zsh | sudo tee -a /etc/shells
sudo chsh -s $hombrew_zsh $USER
sudo chsh -s $homebrew_zsh $USER

if [ ! -d ~/.dotfiles ]; then
curl https://raw.github.com/nixme/dotfiles/master/bin/install-dotfiles | sh
curl https://raw.githubusercontent.com/nixme/dotfiles/master/bin/install-dotfiles | bash
fi


#################################### EMACS #####################################

# Latest release
url=$(curl http://emacsformacosx.com/atom/release |
ruby -r"rexml/document" -e "puts REXML::Document.new($<).elements['feed/entry/link'].attributes['href']")
dmg=_emacs_app.dmg
curl -L -o $dmg $url
hdiutil mount $dmg
cp -R /Volumes/Emacs/Emacs.app ~/Applications
hdiutil unmount /Volumes/Emacs
rm $dmg
brew install emacs --cocoa
brew linkapps


##################################### RUBY #####################################

ruby19=1.9.3-p429 # Current patchlevels
ruby20=2.0.0-p195
global_gems="bundler spring pry" # Gems to install globally for each ruby
ruby="ruby 2.1.5"
global_gems="bundler pry" # Gems to install globally for each ruby

# Compile with real GCC and readline. Clang or gcc-llvm make for a buggy MRI,
# and libedit messes up colored prompts.
export CC=gcc-4.2
export RUBY_CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline`"
rbenv install $ruby19
rbenv install $ruby20

rbenv global $ruby20 # Default to Ruby 2.0
rbenv rehash
ruby-install $ruby -- CC=gcc-4.9 --with-readline-dir=`brew --prefix readline`

rbenv shell $ruby19
gem install $global_gems
rbenv shell $ruby20
chruby $ruby
gem install $global_gems


#################################### ITERM #####################################

read -r -p "iTerm2 Manual Install:
1. Download iTerm2 from https://code.google.com/p/iterm2/downloads/list
2. Install to ~/Applications
3. Open iTerm2 and then it's Preferences
4. Select 'Load preferences from a custom folder or URL:'
5. Choose '~/.iterm2'
Press Return when finished."


#################################### JAVA ######################################
read -r -p "iTerm2 Manual Configuration:
1. Open iTerm2 and then it's Preferences
2. Select 'Load preferences from a custom folder or URL:'
3. Choose '~/.iterm2'
read -r -p "Install Oracle Java JDK 7 from
http://www.oracle.com/technetwork/java/javase/downloads/index.html
Press Return when finished."


Expand Down

0 comments on commit 233c1bc

Please sign in to comment.