- printf ("Compacting database...\n");
- ret = notmuch_database_compact (path, backup_path, status_update_cb, NULL);
+ notmuch_opt_desc_t options[] = {
+ { .opt_string = &backup_path, .name = "backup" },
+ { .opt_bool = &quiet, .name = "quiet" },
+ { .opt_inherit = notmuch_shared_options },
+ { }
+ };
+
+ opt_index = parse_arguments (argc, argv, options, 1);
+ if (opt_index < 0)
+ return EXIT_FAILURE;
+
+ notmuch_process_shared_options (NULL, argv[0]);
+
+ if (! quiet)
+ printf ("Compacting database...\n");
+ ret = notmuch_database_compact_db (notmuch, backup_path,
+ quiet ? NULL : status_update_cb, NULL);