+ schema_source = g_settings_schema_source_ref (g_settings_schema_source_get_default ());
+
+ if (argc > 3 && g_str_equal (argv[1], "--schemadir"))
+ {
+ GSettingsSchemaSource *parent = schema_source;
+ GError *error = NULL;
+
+ schema_source = g_settings_schema_source_new_from_directory (argv[2], parent, FALSE, &error);
+ g_settings_schema_source_unref (parent);
+
+ if (schema_source == NULL)
+ {
+ g_printerr (_("Could not load schemas from %s: %s\n"), argv[2], error->message);
+ g_clear_error (&error);
+
+ return 1;
+ }
+
+ /* shift remaining arguments (not correct wrt argv[0], but doesn't matter) */
+ argv = argv + 2;
+ argc -= 2;
+ }
+
+ if (strcmp (argv[1], "help") == 0)