// Else, check if the source folder exists } else { if (!file_exists($argv[2])) { echo Install::cliError(2); // Else, check if the output file ends in '.php' } else { if (strtolower(substr($argv[3], -4)) != '.php') { echo Install::cliError(3); // Else, generate the class map file } else { echo 'Generating class map file \'' . $argv[3] . '\' from source folder \'' . $argv[2] . '\'' . PHP_EOL; Classmap::generate($argv[2], $argv[3]); // Add project to the bootstrap file $input = Install::cliInput('Add classmap to the bootstrap file? (Y/N) '); if ($input == 'y') { $location = Install::getBootstrap(); $bootstrap = new File($location . '/bootstrap.php'); $bootstrap->write("\$autoloader->loadClassMap('" . addslashes(realpath($argv[3])) . "');" . PHP_EOL . PHP_EOL, true)->save(); } echo 'Done.' . PHP_EOL . PHP_EOL; } } } // Else, install project } else { if ($argv[1] == '-i' || $argv[1] == '--install') { // Check if the project install file argument was passed if (empty($argv[2])) { echo Install::cliError(4); // Else, run the install process } else {