diff options
author | Alexander Larsson <alexl@redhat.com> | 2016-05-02 10:47:59 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2016-05-02 10:47:59 +0200 |
commit | 123f32015dd852ea788ea699accef1331dc8fa56 (patch) | |
tree | 75d9cffe3f9845fd72c51fe6d724279101c573d9 /app | |
parent | 2f465215e23f956419b9ae905ae3c94717bc2de1 (diff) | |
download | xdg-app-123f32015dd852ea788ea699accef1331dc8fa56.tar.gz |
tests/test-run.sh: Add tests for proper installation
Diffstat (limited to 'app')
-rw-r--r-- | app/xdg-app-main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/xdg-app-main.c b/app/xdg-app-main.c index 9f0a642..9cf751e 100644 --- a/app/xdg-app-main.c +++ b/app/xdg-app-main.c @@ -30,9 +30,11 @@ #include "libgsystem.h" #include "xdg-app-builtins.h" +#include "xdg-app-utils.h" static gboolean opt_verbose; static gboolean opt_version; +static gboolean opt_default_arch; static gboolean opt_user; typedef struct { @@ -80,6 +82,7 @@ static XdgAppCommand commands[] = { static GOptionEntry global_entries[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, "Print debug information during command processing", NULL }, { "version", 0, 0, G_OPTION_ARG_NONE, &opt_version, "Print version information and exit", NULL }, + { "default-arch", 0, 0, G_OPTION_ARG_NONE, &opt_default_arch, "Print default arch and exit", NULL }, { NULL } }; @@ -187,6 +190,12 @@ xdg_app_option_context_parse (GOptionContext *context, exit (EXIT_SUCCESS); } + if (opt_default_arch) + { + g_print ("%s\n", xdg_app_get_arch ()); + exit (EXIT_SUCCESS); + } + if (!(flags & XDG_APP_BUILTIN_FLAG_NO_DIR)) { dir = xdg_app_dir_get (opt_user); |