I have a workflow setup to download wordpress, extract it into my dev sites directory, clone a few repos for my starter theme and a few plugins, create a database, run npm install and grunt in a terminal window, etc. The last step I'm trying to do via an output script is run a instance of wp_install() in a PHP script to run the full installation and then have the browser open the site.
Here's a gist of the PHP code I'm running: https://gist.github.com/mattbanks/5213396
I tried running it as a PHP output script and changing line 3 to $site = "{query}"; but it wasn't working. I then tried calling:
php -f installing.php -- {query}
via a Bash script and grabbing {query} as argv[1], but no dice there either. If I copy the file to the root directory of the WordPress install and run it in the browser with a query string of "q" (as setup in the gist), it works properly (ie http://sites.dev/mysite/installing.php?q=mysite).
So I tried copying the installing.php file from the workflow directory over to the WordPress site directory I created, which works fine, but I can't get the browser to properly open the file. I know the {query} variable is passing properly because I threw a notification of it and it's there just fine. Here's what I'm trying via a bash output script:
cp installing.php ~/Sites/{query}
open http://sites.dev/{query}/installing.php?q={query}
But it's not opening properly. It's throwing me http://sites.dev/{query} - not finishing off the full URL.
Any ideas how I can get it to run properly?
Thanks,
Matt