diff -r 31fb35727621 -r 5cb36c12ac49 app-manager/app-manager.c --- a/app-manager/app-manager.c Sat Jul 16 11:07:18 2016 +0100 +++ b/app-manager/app-manager.c Mon Aug 31 07:12:16 2020 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 J. Ali Harlow + * Copyright (C) 2010, 2020 J. Ali Harlow * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -217,6 +217,7 @@ GtkWidget *w; gchar *s,*database_uri,*contents; gchar *database=NULL,*setup_base=NULL,*update_base=NULL; + gchar *default_action_base=NULL; gsize len; struct comps *comps; PloverPackageSet *set=NULL; @@ -229,6 +230,8 @@ "Setup from installation media","uri"}, {"update",0,0,G_OPTION_ARG_STRING,&update_base, "Update from upgrade media","uri"}, + {"default-action",0,0,G_OPTION_ARG_STRING,&default_action_base, + "Install, remove or update from repository","uri"}, {NULL} }; #ifdef WIN32 @@ -256,9 +259,10 @@ g_printerr("%s\n",err->message); exit(1); } - if (setup_base && update_base) + if (!!setup_base+!!update_base+!!default_action_base>1) { - g_printerr("--setup and --update are mutually exclusive\n"); + g_printerr( + "--setup, --update and --default_action are mutually exclusive\n"); exit(1); } #ifdef WIN32 @@ -294,6 +298,8 @@ started=setup(setup_base); else if (update_base) started=update(update_base); + else if (default_action_base) + started=default_action(default_action_base); else { if (database) @@ -357,6 +363,7 @@ g_free(prefix); g_free(setup_base); g_free(update_base); + g_free(default_action_base); g_free(database); exit(0); }