|
|
|
|
@ -1183,22 +1183,15 @@ int main(int argc, char *argv[]){
|
|
|
|
|
int option_index = 0;
|
|
|
|
|
struct option long_options[] = {
|
|
|
|
|
{"dry-run", 0, 0, 'D'},
|
|
|
|
|
{"ini", 1, 0, 'I'},
|
|
|
|
|
{NULL, 0, NULL, 0}
|
|
|
|
|
};
|
|
|
|
|
optind = 1;
|
|
|
|
|
for (int i = 0; i < size; i++) {
|
|
|
|
|
int argument = getopt_long(argc, argv, "DI:", long_options, &option_index);
|
|
|
|
|
int argument = getopt_long(argc, argv, "D", long_options, &option_index);
|
|
|
|
|
switch (argument) {
|
|
|
|
|
case 'D':
|
|
|
|
|
main_config.dry_run = 1;
|
|
|
|
|
break;
|
|
|
|
|
case 'I':
|
|
|
|
|
main_config.force_ini = yon_char_new(optarg);
|
|
|
|
|
main_config.config_load_path = main_config.force_ini;
|
|
|
|
|
main_config.config_save_path = main_config.force_ini;
|
|
|
|
|
main_config.configure_mode = 1;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|