Skip to content

Instantly share code, notes, and snippets.

@MattiSG
Created Aug 25, 2012
Embed
What would you like to do?
Automatically install Symfony 1 and dependencies on OS X
if ! /usr/local/mysql/support-files/mysql.server start > /dev/null
then echo "MySQL package installed ? Check http://dev.mysql.com/downloads/mysql/5.1.html#macosx-dmg"
exit 1
fi
echo '[client]
socket = /var/mysql/mysql.sock
[mysqld]
socket = /var/mysql/mysql.sock' > /etc/my.cnf
mkdir /var/mysql
chown _mysql /var/mysql
ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
ln -s /usr/local/mysql/bin/mysqladmin /usr/bin/mysqladmin
if /usr/local/mysql/support-files/mysql.server start
then echo "MySQL set up successfully. Installing PEAR."
else echo "Something fucked up while trying to set up MySQL :("
exit 2
fi
dir="/usr/local/bin"
cd /tmp
curl http://pear.php.net/go-pear > go-pear.php
echo "PEAR will ask you for a base directory. Please set it to $dir."
sudo php -q go-pear.php
$dir/bin/pear channel-discover pear.symfony-project.com
$dir/bin/pear install symfony/symfony-1.2.0
if $dir/bin/symfony > /dev/null
then echo "Symfony successfully installed :) Everything finished !"
else echo "Something fucked up while trying to install symfony :("
exit 3
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment