Applies and processes the pre-tsd command line @param cap The main configuration wrapper @param argp The preped command line argument handler
(ConfigArgP cap, ArgP argp)
| 179 | * @param argp The preped command line argument handler |
| 180 | */ |
| 181 | protected static void applyCommandLine(ConfigArgP cap, ArgP argp) { |
| 182 | // --config, --include-config, --help |
| 183 | if(argp.has("--help")) { |
| 184 | if(cap.hasNonOption("extended")) { |
| 185 | System.out.println(cap.getExtendedUsage("tsd extended usage:")); |
| 186 | } else { |
| 187 | System.out.println(cap.getDefaultUsage("tsd usage:")); |
| 188 | } |
| 189 | System.exit(0); |
| 190 | } |
| 191 | if(argp.has("--config")) { |
| 192 | loadConfigSource(cap, argp.get("--config").trim()); |
| 193 | } |
| 194 | if(argp.has("--include")) { |
| 195 | String[] sources = argp.get("--include").split(","); |
| 196 | for(String s: sources) { |
| 197 | loadConfigSource(cap, s.trim()); |
| 198 | } |
| 199 | } |
| 200 | } |
| 201 | |
| 202 | /** |
| 203 | * Applies the properties from the named source to the main configuration |
no test coverage detected