summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Playfair Cal <daniel.playfair.cal@gmail.com>2019-02-04 00:41:46 +0000
committerDaniel Playfair Cal <daniel.playfair.cal@gmail.com>2019-02-04 00:41:46 +0000
commit9c73bfa81943cb77cf5e3c1f67fa80300d3b6d23 (patch)
tree86e909f0808aa318deec49eae315c8874200f804 /bin
parent31faca1234ebb9b23c997d9ffebaa757a1f3e214 (diff)
parentfd0af5801de440d550725e1bac93497865cf21c4 (diff)
downloaddconf-9c73bfa81943cb77cf5e3c1f67fa80300d3b6d23.tar.gz
Merge branch 'update-doc' into 'master'
bin: Document update command directory argument Closes #39 See merge request GNOME/dconf!41
Diffstat (limited to 'bin')
-rw-r--r--bin/dconf.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/bin/dconf.c b/bin/dconf.c
index 2688ca7..8e3f060 100644
--- a/bin/dconf.c
+++ b/bin/dconf.c
@@ -938,6 +938,12 @@ dconf_compile (const gchar **argv,
return gvdb_table_write_contents (table, output, byteswap, error);
}
+static gchar *
+get_system_db_path ()
+{
+ return g_build_filename (SYSCONFDIR, "dconf", "db", NULL);
+}
+
static gboolean
dconf_update (const gchar **argv,
GError **error)
@@ -951,7 +957,7 @@ dconf_update (const gchar **argv,
index += 1;
}
else
- dir = g_build_filename (SYSCONFDIR, "dconf", "db", NULL);
+ dir = get_system_db_path ();
if (argv[index] != NULL)
return option_error_set (error, "too many arguments");
@@ -1004,7 +1010,7 @@ static const Command commands[] = {
{
"update", dconf_update,
"Update the system dconf databases",
- ""
+ " [DBDIR] "
},
{
"watch", dconf_watch,
@@ -1116,6 +1122,12 @@ command_show_help (const Command *cmd,
if (strstr (cmd->synopsis, " SUFFIX ") != NULL)
g_string_append (s, " SUFFIX An empty string '' or '/'.\n");
+ if (strstr (cmd->synopsis, " [DBDIR] ") != NULL)
+ {
+ g_autofree gchar *path = get_system_db_path ();
+ g_string_append_printf (s, " DBDIR The databases directory. Default: %s\n", path);
+ }
+
g_string_append (s, "\n");
}
}