From http://www.crucialwebhost.com/kb/magento-automated-bash-script-installer/