| src/migrate.php |
| 38 | 38 | |
| 39 | 39 | $cg = new Console_Getopt(); |
| 40 | 40 | $shortoptions = 'aixuc:v:d'; |
| 41 | | $longoptions = array('app=', 'version=', 'conf=', 'search-path='); |
| 41 | $longoptions = array('app=', 'version=', 'conf=', 'search-path=', 'include-path='); |
| 42 | 42 | |
| 43 | 43 | $args = $cg->readPHPArgv(); |
| 44 | 44 | |
| ... | ... | |
| 58 | 58 | .' Upgrade MyApp: migrate.php --conf=path/to/config.php --app=MyApp'."\n" |
| 59 | 59 | .''."\n" |
| 60 | 60 | .'Options:'."\n" |
| 61 | | .' c, --conf: Path to the configuration file.'."\n" |
| 62 | | .' a: Upgrade all the installed applications.'."\n" |
| 63 | | .' v, --version: Upgrade/Downgrade to the given version.'."\n" |
| 64 | | .' --app: Application to upgrade/downgrade.'."\n" |
| 65 | | .' u: Dry run, do nothing.'."\n" |
| 66 | | .' --search-path: Set the DB search path before the run.'."\n" |
| 67 | | .' d: Display debug information.'."\n" |
| 68 | | .' i: Install the application(s).'."\n" |
| 69 | | .' x: Uninstall the application(s).'."\n" |
| 61 | .' c, --conf: Path to the configuration file.'."\n" |
| 62 | .' a: Upgrade all the installed applications.'."\n" |
| 63 | .' v, --version: Upgrade/Downgrade to the given version.'."\n" |
| 64 | .' --app: Application to upgrade/downgrade.'."\n" |
| 65 | .' u: Dry run, do nothing.'."\n" |
| 66 | .' --search-path: Set the DB search path before the run.'."\n" |
| 67 | .' --include-path: Paths to add to the PHP include path.'."\n" |
| 68 | .' d: Display debug information.'."\n" |
| 69 | .' i: Install the application(s).'."\n" |
| 70 | .' x: Uninstall the application(s).'."\n" |
| 70 | 71 | .''."\n" |
| 71 | 72 | .'Note: The command line parser of PEAR is not very robust'."\n" |
| 72 | 73 | .' if you have an unexpected error about an offset not'."\n" |
| ... | ... | |
| 125 | 126 | case '--search-path': |
| 126 | 127 | $search_path = trim($o[1]); |
| 127 | 128 | break; |
| 129 | case '--include-path': |
| 130 | set_include_path(get_include_path().PATH_SEPARATOR.trim($o[1])); |
| 131 | break; |
| 128 | 132 | case 'u': |
| 129 | 133 | $what['dry_run'] = true; |
| 130 | 134 | break; |