
Untitled
By: a guest on
Jul 20th, 2012 | syntax:
None | size: 1.87 KB | hits: 7 | expires: Never
#!/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 /usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
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
wget https://github.com/finger-berlin/brew-formulas/blob/master/php-memcached.rb -O /usr/local/Library/Formula/php-memcached.rb
brew install libvbucket
brew install libcouchbase
brew install php --with-fpm --with-mysql
brew install nginx
brew instell php-memcached
exit