[Libosinfo] [PATCH] install-script tool: Display names of generated files

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Thu Feb 7 00:04:57 UTC 2013


From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>

Also add a commandline option (-q/--quiet) to disable this behavior.
---
 tools/osinfo-install-script.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/osinfo-install-script.c b/tools/osinfo-install-script.c
index ac71cc0..73f1d3d 100644
--- a/tools/osinfo-install-script.c
+++ b/tools/osinfo-install-script.c
@@ -34,6 +34,7 @@ static const gchar *prefix;
 
 static gboolean list_config = FALSE;
 static gboolean list_profile = FALSE;
+static gboolean quiet = FALSE;
 
 static OsinfoInstallConfig *config;
 
@@ -78,6 +79,8 @@ static GOptionEntry entries[] =
       N_("List configuration parameters"), NULL },
     { "list-profiles", '\0', 0, G_OPTION_ARG_NONE, (void*)&list_profile,
       N_("List install script profiles"), NULL },
+    { "quiet", 'q', 0, G_OPTION_ARG_NONE, (void*)&quiet,
+      N_("Do not display output filenames"), NULL },
     { NULL }
 };
 
@@ -229,6 +232,8 @@ static gboolean generate_script(OsinfoOs *os)
                        error->message ? error->message : "unknown");
             goto cleanup;
         }
+        if (!quiet)
+           g_print ("%s\n", osinfo_install_script_get_output_filename(script));
     }
     ret = TRUE;
 
-- 
1.8.1




More information about the Libosinfo mailing list