Skip to content

Instantly share code, notes, and snippets.

@FrancisVarga
Forked from finger-berlin/setup_macosx.sh
Created March 27, 2012 06:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FrancisVarga/2213266 to your computer and use it in GitHub Desktop.
Save FrancisVarga/2213266 to your computer and use it in GitHub Desktop.
setup a virgin mac osx
#!/bin/bash
function test_setup () {
PASS=1
for b in \
/usr/bin/ruby \
/usr/bin/make \
/usr/bin/gcc
do
echo -n "check for '$b'..."
if [ -f $b ]
then echo OK
else echo ERR ; PASS=0
fi;
done
if [ $PASS == 1 ]
then true
else exit
fi
}
function setup_brew () {
if [ -f /usr/local/bin/brew ]
then true
else echo /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
fi
}
#####
sudo true || exit
test_setup
setup_brew
brew update
brew upgrade
brew install wget
brew install findutils
brew install pwgen
brew install nmap
brew install git
brew install git-extras
brew install git-flow
brew install git-multipush
brew install git-utils
brew install mysql
if [ -f /etc/my.cnf ]
then echo "check if /etc/my.cnf fit your need!"
else
MY_CNF=https://raw.github.com/gist/1869325/my.cnf
sudo wget $MY_CNF -O /etc/my.cnf
fi
if [ -d /usr/local/var/mysql/performance_schema ];
then true # mysql looks fine...
else
mysql_install_db --verbose --user=`whoami` \
--basedir="$(brew --prefix mysql)" \
--datadir="$(brew --prefix)/var/mysql" \
--tmpdir=/tmp
fi
brew install libxml2
brew install mcrypt
wget https://raw.github.com/ampt/homebrew/php/Library/Formula/php.rb -O /usr/local/Library/Formula/php.rb
wget https://raw.github.com/finger-berlin/brew-formulas/master/libcouchbase.rb -O /usr/local/Library/Formula/libcouchbase.rb
wget https://raw.github.com/finger-berlin/brew-formulas/master/libvbucket.rb -O /usr/local/Library/Formula/libvbucket.rb
brew install libvbucket
brew install libcouchbase
# couchbase extension still missing!!!
# from here not tested!
#brew install mcrypt-php
#brew install beanstalk
#brew install graphviz
#brew install neon
#brew install scala
#brew install qcachegrind
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment