Created
June 11, 2014 18:15
-
-
Save ibejohn818/6c2d9e70756405c69d95 to your computer and use it in GitHub Desktop.
Cake 2.X Cakeshell template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
//path to lib/Cake/Console/cake | |
$cakeShellpath = ""; | |
//path to your default app directory. IE: /home/sites/mysite.com/cake/app | |
// ( So you don't have to add '--app /myapppath' for every call and if you're hosting multiple cake sites under a single installation) | |
$defaultAppPath = ""; | |
$cmd = $cakeShellpath; | |
if(!in_array("-app",$argv) || !in_array("--app",$argv)) { | |
$argv[] = "--app"; | |
$argv[] = $defaultAppPath; | |
} | |
foreach($_SERVER['argv'] as $k=>$v) { | |
if($k===0) { | |
continue; | |
} | |
$cmd .= " {$v}"; | |
} | |
passthru($cmd,$res); | |
exit($res); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment