joomla/joomla-cms — pull request #2764 by totten (2014-01-07 10:54:03+00:00)
Title: cli/install.php - Add command-line interface to the installation system

Example usage:

```bash
git clone https://github.com/joomla/joomla-cms.git
cd joomla-cms
php cli/install.php \
--db-user=myuser --db-name=mydb --db-pass=mysecret \
--admin-pass=admin --admin-pass=secret --admin-email='admin@example.com'
rm -rf installation
```

This is my first patch to Joomla, and the patch has a couple FIXME's which may require discussion. The main FIXMEs:
* JApplicationCliInstaller::doExecute() sets "$options['db_created'] = 1" as a workaround. This shouldn't be necessary because InstallationModelDatabase tries to set that value by way of $session, but something's wonky with the handling of $session, and I don't know the ins-and-outs about JApplicationCli/JApplicationCms/JSession.
* getLocaliseAdmin() has been brutishly copied-and-pasted from InstallationApplicationWeb to JApplicationCliInstaller. I don't particularly know what it's for, but it doesn't appear to depend on $this, so it could be safely moved to another class (where it's easier to share code).