From 3e5d8dbd6b2d99f6c9c0af75b0613483cdb3e1c7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luis=20Guzm=C3=A1n?= <ark@switnet.org>
Date: Thu, 5 Jan 2023 02:51:40 +0000
Subject: [PATCH] ubuntukylin-wallpapers: add current trisquel artwork
 wallpaper to options.

---
 helpers/make-ubuntukylin-wallpapers | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/helpers/make-ubuntukylin-wallpapers b/helpers/make-ubuntukylin-wallpapers
index cce3f27d..1e8c3cc1 100644
--- a/helpers/make-ubuntukylin-wallpapers
+++ b/helpers/make-ubuntukylin-wallpapers
@@ -17,7 +17,7 @@
 #    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
 #
 
-VERSION=2
+VERSION=3
 
 . ./config
 
@@ -26,9 +26,26 @@ sed -i "s|background=.*|background=\"/usr/share/backgrounds/$CODENAME.jpg\"|" 30
 sed -i "s|picture-uri=.*|picture-uri=\'file:///usr/share/backgrounds/$CODENAME.jpg\'|" 30_ubuntukylin-wallpapers.gschema.override
 
 # Copy final artwork from trisquel-packages/$VERSION/trisquel-wallpapers repository.
-# Make sure to force helper fail on release update.
+# Make sure to force helper fail on release update, so it's fixed once the new artwork is released.
 cp $DATA/$CODENAME.jpg warty-final-ubuntukylin.jpg
 
+# Add current release wallpaper to any possible xml release kylin-wallpaper file.
+for i in $(find -name \*.xml.in)
+do
+sed -i '/<\/wallpapers>/,/^$/d' $i
+cat << EOF >> $i
+ <wallpaper>
+     <_name>Trisquel $REVISION - ${CODENAME^}</_name>
+     <filename>/usr/share/backgrounds/$CODENAME.jpg</filename>
+     <options>zoom</options>
+     <pcolor>#000000</pcolor>
+     <scolor>#000000</scolor>
+     <shade_type>solid</shade_type>
+ </wallpaper>
+</wallpapers>
+EOF
+done
+
 changelog "Rebranding for trisquel."
 
 compile
-- 
GitLab