Skip to content

Instantly share code, notes, and snippets.

@bradbergeron-us
Last active August 29, 2015 14:19
Show Gist options
  • Save bradbergeron-us/68edced7429b295664bc to your computer and use it in GitHub Desktop.
Save bradbergeron-us/68edced7429b295664bc to your computer and use it in GitHub Desktop.
Adds All The Homebrew Packages that I always Forget about in a single Script
#!/usr/bin/env ruby
def parse_package_list(string)
lines = string.split("\n")
active_packages = lines.reject{|package| package =~ /\A\s*\#/}
active_packages.each { |package| package.sub!(/\s*\#.*\Z/, '') }
active_packages
end
brew_packages = parse_package_list(<<-EOD)
ack
aspell
atk
autoconf
automake
bash-completion
bats
binutils
brew-cask
cabextract
cmake
cmatrix
composer
coreutils --default-names
cowsay
ctags
curl
diffutils
docker
dos2unix
emacs
faac
fasd
fceux
ffmpeg
findutils --default-names
flac
fontconfig
fortune
freetype
gawk
gdbm
gettext
gfortran
gist
git
git-extras
git-flow
glib
gtk+
gzip
imagemagick
jasper
jpeg
lame
libyaml
libzip
lua
lynx
lzip
memcached
mhash
node
openssh --with-brewed-openssl
openssl
ossp-uuid
p11-kit
pango
pcre
phantomjs
php56
pkg-config
# postgresql- install manually via GUI app on website
pstree
python --with-brewed-openssl
r
readline
reattach-to-user-namespace
redis
rename
rsync
s3fs
scons
sdl
sox
subversion
svn
terminal-notifier # Alerts to OSX Notification Center via terminal.
the_silver_searcher
tmux
tree
ttyrec
unixodbc
unrar
unzip
vim
watch
wdiff --with-gettext
wget
yasm
EOD
cask_packages = parse_package_list(<<-EOD)
sqlite-database-browser
# sublime-text
# totalterminal
# tower
# transmit
vagrant
# virtualbox
# vlc
EOD
def run(command)
puts `#{command} 2>&1`
end
# Add additional Homebrew sources.
run "brew tap homebrew/dupes"
run "brew tap homebrew/games"
# Set up Cask.
run "brew install caskroom/cask/brew-cask"
# Set up required libraries.
run "brew link pcre"
run "brew cask install xquartz"
# Install configured packages.
brew_packages.each do |package|
run "brew install #{package}"
end
cask_packages.each do |package|
run "brew cask install #{package}"
end
# Link .app files to /Applications.
run "brew linkapps"
# Clean up Homebrew cache.
run "brew cleanup"
run "brew prune"
run "brew cask cleanup"
# Link dotfiles to paths where they'll actually be accessed.
# run "ln -s ~/dotfiles/gitconfig ~/.gitconfig"
# run "ln -s ~/dotfiles/gitignore ~/.gitignore"
# run "ln -s ~/dotfiles/inputrc ~/.inputrc"
# run "ln -s ~/dotfiles/irbrc ~/.irbrc"
# run "ln -s ~/dotfiles/tmux.conf ~/.tmux.conf"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment