[gnome-software] Add a 'refresh' action to gnome-software-cmd



commit 36a3f506cd0a2d7d3bb906e862d639b62281c2b8
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jun 25 15:05:12 2015 +0100

    Add a 'refresh' action to gnome-software-cmd

 src/gs-cmd.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-cmd.c b/src/gs-cmd.c
index da87a3a..bfab5a8 100644
--- a/src/gs-cmd.c
+++ b/src/gs-cmd.c
@@ -374,6 +374,10 @@ main (int argc, char **argv)
                                break;
                        }
                }
+       } else if (argc == 2 && g_strcmp0 (argv[1], "refresh") == 0) {
+               ret = gs_plugin_loader_refresh (plugin_loader, 0,
+                                               GS_PLUGIN_REFRESH_FLAGS_UPDATES,
+                                               NULL, &error);
        } else {
                ret = FALSE;
                g_set_error_literal (&error,
@@ -382,7 +386,7 @@ main (int argc, char **argv)
                                     "Did not recognise option, use 'installed', "
                                     "'updates', 'popular', 'get-categories', "
                                     "'get-category-apps', 'filename-to-app', "
-                                    "'sources', or 'search'");
+                                    "'sources', 'refresh' or 'search'");
        }
        if (!ret) {
                g_print ("Failed: %s\n", error->message);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]