Example #1
0
    }
    if (!isset($parameters['ini'])) {
        throw new Exception("ini file name forgotten\n");
    }
    if (isset($switches['-ini'])) {
        echo ENV::getIniContent();
        exit(0);
    }
}
function debugVars()
{
    foreach ($GLOBALS as $n => $v) {
        if (ENV::verifyName($n, false)) {
            echo $n, " = ";
            var_export($v);
            echo "\n";
        }
    }
}
try {
    if (!isset($BUILD_OPTIONS)) {
        throw new Exception('$BUILD_OPTIONS variable is missing in your build file');
    }
    $BUILD_OPTIONS['VERBOSE_MODE'] = array("", false);
    ENV::init($BUILD_OPTIONS);
    init();
} catch (Exception $e) {
    echo "\n\njBuildTools error : ", $e->getMessage(), "\n";
    echo "  options :  [-vh] [-D foo=bar]* file.ini\n      -v  : verbose mode\n      -D  : declare a variable and its value\n      -h  : only display list of build options\n";
    exit(1);
}