[gnome-software: 1/6] contrib: Improve formatting of build commands for example plugin




commit a796fce5ea46693ad28bb65908ecc977d15f98ad
Author: Philip Withnall <pwithnall endlessos org>
Date:   Sun Mar 14 16:08:21 2021 +0000

    contrib: Improve formatting of build commands for example plugin
    
    The commands themselves have not changed. I’ve tested them with the
    latest gnome-software master and they work fine.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Fixes: #1168

 contrib/gs-plugin-example.c     | 10 ++++++----
 doc/api/gnome-software-docs.xml |  6 +++---
 2 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/contrib/gs-plugin-example.c b/contrib/gs-plugin-example.c
index 92822eb61..980a2dcfb 100644
--- a/contrib/gs-plugin-example.c
+++ b/contrib/gs-plugin-example.c
@@ -25,10 +25,12 @@
 /*
  * Compile and install with:
  *
-gcc -shared -o libgs_plugin_example.so gs-plugin-example.c -fPIC \
- `pkg-config --libs --cflags gnome-software` \
- -DI_KNOW_THE_GNOME_SOFTWARE_API_IS_SUBJECT_TO_CHANGE &&
- sudo cp libgs_plugin_example.so `pkg-config gnome-software --variable=plugindir`
+ * |[
+ * gcc -shared -o libgs_plugin_example.so gs-plugin-example.c -fPIC \
+ *     $(pkg-config --libs --cflags gnome-software) \
+ *     -DI_KNOW_THE_GNOME_SOFTWARE_API_IS_SUBJECT_TO_CHANGE && \
+ * cp libgs_plugin_example.so $(pkg-config gnome-software --variable=plugindir)
+ * ]|
  */
 
 void
diff --git a/doc/api/gnome-software-docs.xml b/doc/api/gnome-software-docs.xml
index 80cd6a9b3..d66965fd2 100644
--- a/doc/api/gnome-software-docs.xml
+++ b/doc/api/gnome-software-docs.xml
@@ -122,9 +122,9 @@ gs_plugin_add_search (GsPlugin *plugin,
         <informalexample>
           <programlisting>
 gcc -shared -o libgs_plugin_example.so gs-plugin-example.c -fPIC \
- `pkg-config --libs --cflags gnome-software` \
- -DI_KNOW_THE_GNOME_SOFTWARE_API_IS_SUBJECT_TO_CHANGE &amp;&amp;
- sudo cp libgs_plugin_example.so `pkg-config gnome-software --variable=plugindir`
+    $(pkg-config --libs --cflags gnome-software) \
+    -DI_KNOW_THE_GNOME_SOFTWARE_API_IS_SUBJECT_TO_CHANGE &amp;&amp; \
+cp libgs_plugin_example.so $(pkg-config gnome-software --variable=plugindir)
           </programlisting>
         </informalexample>
 


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