diff options
author | Richard Hughes <richard@hughsie.com> | 2009-10-01 11:56:37 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2009-10-01 11:56:37 +0100 |
commit | b4fbd0a206904037bd28892019e3d03a33266105 (patch) | |
tree | c7d56dae150602762adae15deac268afaefd717e /client | |
parent | 8f24d02258e227bf7330239ee6f8fe9accebf352 (diff) |
feature: Add --noninteractive and --idle command line switches to pkcon
Diffstat (limited to 'client')
-rw-r--r-- | client/pk-console.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/client/pk-console.c b/client/pk-console.c index 75fcf9f1f..ca8d469c8 100644 --- a/client/pk-console.c +++ b/client/pk-console.c @@ -967,6 +967,8 @@ main (int argc, char *argv[]) gboolean ret; GError *error = NULL; gboolean verbose = FALSE; + gboolean is_idle = FALSE; + gboolean noninteractive = FALSE; gboolean program_version = FALSE; GOptionContext *context; gchar *options_help; @@ -994,6 +996,12 @@ main (int argc, char *argv[]) { "nowait", 'n', 0, G_OPTION_ARG_NONE, &nowait, /* TRANSLATORS: command line argument, work asynchronously */ _("Exit without waiting for actions to complete"), NULL}, + { "noninteractive", 'y', 0, G_OPTION_ARG_NONE, &noninteractive, + /* command line argument, do we ask questions */ + _("Install the packages without asking for confirmation"), NULL }, + { "idle", 'n', 0, G_OPTION_ARG_NONE, &is_idle, + /* TRANSLATORS: command line argument, this command is not a priority */ + _("Run the command using idle network bandwidth and also using less power"), NULL}, { NULL} }; @@ -1065,6 +1073,10 @@ main (int argc, char *argv[]) /* create transactions */ task = pk_task_text_new (); + g_object_set (task, + "idle", is_idle, + "simulate", !noninteractive, + NULL); /* check filter */ if (filter != NULL) { |