Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 20th, 2012  |  syntax: None  |  size: 1.87 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2.  
  3. function test_setup () {
  4.         PASS=1
  5.  
  6.         for b in \
  7.                 /usr/bin/ruby \
  8.                 /usr/bin/make \
  9.                 /usr/bin/gcc
  10.                 do
  11.                 echo -n "check for '$b'..."
  12.                 if [ -f $b ]
  13.                         then echo OK
  14.                         else echo ERR ; PASS=0
  15.                 fi;
  16.         done
  17.  
  18.         if [ $PASS == 1 ]
  19.                 then true
  20.                 else exit
  21.         fi
  22. }
  23.  
  24. function setup_brew () {
  25.         if [ -f /usr/local/bin/brew ]
  26.                 then true
  27.                 else /usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
  28.         fi
  29. }
  30.  
  31. #####
  32.  
  33. sudo true || exit
  34.  
  35. test_setup
  36.  
  37. setup_brew
  38.  
  39. brew update
  40. brew upgrade
  41.  
  42. brew install wget
  43. brew install findutils
  44. brew install pwgen
  45. brew install nmap
  46. brew install git
  47. brew install git-extras
  48. brew install git-flow
  49. brew install git-multipush
  50. brew install git-utils
  51. brew install mysql
  52.  
  53. if [ -f /etc/my.cnf ]
  54.     then echo "check if /etc/my.cnf fit your need!"
  55.     else
  56.     MY_CNF=https://raw.github.com/gist/1869325/my.cnf
  57.     sudo wget $MY_CNF -O /etc/my.cnf
  58. fi
  59.  
  60. if [ -d /usr/local/var/mysql/performance_schema ];
  61.     then true # mysql looks fine...
  62.     else
  63.     mysql_install_db --verbose --user=`whoami` \
  64.                      --basedir="$(brew --prefix mysql)" \
  65.                      --datadir="$(brew --prefix)/var/mysql" \
  66.                      --tmpdir=/tmp
  67. fi
  68.  
  69. brew install libxml2
  70. brew install mcrypt
  71.  
  72. wget https://raw.github.com/ampt/homebrew/php/Library/Formula/php.rb -O /usr/local/Library/Formula/php.rb
  73. wget https://raw.github.com/finger-berlin/brew-formulas/master/libcouchbase.rb -O /usr/local/Library/Formula/libcouchbase.rb
  74. wget https://raw.github.com/finger-berlin/brew-formulas/master/libvbucket.rb -O /usr/local/Library/Formula/libvbucket.rb
  75. wget https://github.com/finger-berlin/brew-formulas/blob/master/php-memcached.rb -O /usr/local/Library/Formula/php-memcached.rb
  76.  
  77. brew install libvbucket
  78. brew install libcouchbase
  79. brew install php --with-fpm --with-mysql
  80. brew install nginx
  81. brew instell php-memcached
  82.  
  83. exit