/** * Set the 'EDITOR' variable to be set. * This is a linux-specific thing that svn shares also. * * The user will usually set their preferred EDITOR, be it vi/vim, emacs or nano. * If they didn't, ask the user for their choice. */ public static function RequireEditor() { global $previous_editor; // First, check the editor in the "session" file. \Core\CLI\CLI::LoadSettingsFile('editor'); if (isset($previous_editor)) $_SERVER['EDITOR'] = $previous_editor; if (!isset($_SERVER['EDITOR']) || $_SERVER['EDITOR'] == '') { // I need to assemble a list of editors currently on the system. $opts = array(); $default = false; if (($loc = trim(`which vi`))) $opts[$loc] = $loc; if (($loc = trim(`which vim`))) $opts[$loc] = $loc; if (($loc = trim(`which emacs`))) $opts[$loc] = $loc; if (($loc = trim(`which nano`))) { $opts[$loc] = $loc; $default = $loc; } $_SERVER['EDITOR'] = \Core\CLI\CLI::PromptUser( 'Which editor do you want to use for editing text files? If you are unsure, simply press enter if there is a default option.', $opts, $default ); // And remember this option. $previous_editor = $_SERVER['EDITOR']; \Core\CLI\CLI::SaveSettingsFile('editor', array('previous_editor')); } }
} // I need a few variables first about the user... $packagername = ''; $packageremail = ''; \Core\CLI\CLI::LoadSettingsFile('packager'); if(!$packagername){ $packagername = \Core\CLI\CLI::PromptUser('Please provide your name you wish to use for packaging', 'text-required'); } if(!$packageremail){ $packageremail = \Core\CLI\CLI::Promptuser('Please provide your email you wish to use for packaging.', 'text-required'); } \Core\CLI\CLI::SaveSettingsFile('packager', array('packagername', 'packageremail')); if(!is_dir(ROOT_PDIR . '_gen/')) mkdir(ROOT_PDIR . '_gen/'); $backend = Core::DB(); foreach($backend->_getTables() as $name){ if(strpos($name, '_') === false){ $classname = ucwords($name); } else{ //$classname = explode('_', substr($name, 4)); $classname = explode('_', $name); foreach($classname as $k => $v){
// I need a few variables first about the user... $packagername = ''; $packageremail = ''; CLI::LoadSettingsFile('packager'); if(!$packagername){ $packagername = CLI::PromptUser('Please provide your name you wish to use for packaging', 'text-required'); } if(!$packageremail){ $packageremail = CLI::Promptuser('Please provide your email you wish to use for packaging.', 'text-required'); } CLI::SaveSettingsFile('packager', ['packagername', 'packageremail']); // Before ANYTHING happens.... make sure that the system is compiled! // echo '# Compiling system...' . "\n"; // exec(escapeshellarg(BASE_DIR . 'utilities/compiler.php')); //echo "OK!\n"; while(true){ if(!($opts['quiet'] || $opts['name'])){ CLI::PrintHeader('Building Main Menu'); } // Purge the cache of exported versions. $_cversions = null;