whoops! forgot to add the toolkit, forgot a quote, and messed up verbosity comparison.
This commit is contained in:
@@ -5,7 +5,7 @@ require_once("toolkit.php");
|
||||
$cake_api = file_get_contents("https://github.com/cakephp/cakephp/tags");
|
||||
if( preg_match("/\<span class=\"tag\-name\"\>([0-9\.]+)\<\/span\>/", $cake_api, $matches) ) {
|
||||
$cake_current = $matches[1];
|
||||
verbose(Current CakePHP version: $cake_current", 1);
|
||||
verbose("Current CakePHP version: $cake_current", 1);
|
||||
}else {
|
||||
die("Unable to determine current CakePHP version, exiting\n");
|
||||
}
|
||||
|
||||
26
run.d/toolkit.php
Normal file
26
run.d/toolkit.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?
|
||||
// Generic tasks to read shell/environment settings into PHP
|
||||
//
|
||||
|
||||
// Environment CHK_HOSTS holds hosts to check, get them in an array
|
||||
//
|
||||
if( getenv('CHK_HOSTS') == null ) {
|
||||
$hosts = null;
|
||||
}else {
|
||||
$hosts = explode(' ', getenv('CHK_HOSTS'));
|
||||
if (implode($hosts)=='') die("No hosts to check.\n");
|
||||
}
|
||||
|
||||
// Verbosity settings
|
||||
//
|
||||
if( getenv('VERBOSE') == null ) {
|
||||
$verbose = 0;
|
||||
} else {
|
||||
$verbose = getenv('VERBOSE');
|
||||
}
|
||||
function verbose($msg, $loglevel=0) {
|
||||
global $verbose;
|
||||
if($loglevel <= $verbose) echo $msg."\n";
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user