1. Ronoaldo Pereira
  2. desktop-theme-growing


Ulrich Hansen  committed 4807a7f

Fixed a bug (test -d could match more than one file). I am using find now
to do the job.
The autostart for the Gnome wallpaper now also clears the cache and updates
alternatives. So the new Gnome wallpaper should be visible in all cases.

  • Participants
  • Parent commits 507954b
  • Branches default

Comments (0)

Files changed (2)

File backgrounds/growing-autostart.desktop

View file
  • Ignore whitespace
 Name=Growing Desktop Theme
 Comment=Installs the wallpaper in Gnome. A small cookie is placed into the homefolder to prevent a double install. Clear cache.
-Exec=/bin/sh -c "/usr/bin/test -f ~/.desktop-theme-growing.id || /usr/bin/gsettings set org.gnome.desktop.background picture-uri file:///usr/share/images/desktop-base/desktop-background; /bin/touch ~/.desktop-theme-growing.id"
+Exec=/bin/sh -c "rm -f $HOME/.cache/wallpaper/*; update-alternatives --auto desktop-background; /usr/bin/test -f ~/.desktop-theme-growing.id || /usr/bin/gsettings set org.gnome.desktop.background picture-uri file:///usr/share/images/desktop-base/desktop-background; /bin/touch ~/.desktop-theme-growing.id"

File debian/postrm

View file
  • Ignore whitespace
 restore_plymouth_theme() {
     sed -i  '/growing/d' /var/log/desktop-theme-packages.log
     # Get previous theme
-    test -d /usr/share/desktop-theme-* && theme=$(tail -1 /var/log/desktop-theme-packages.log)
+    find /usr/share -maxdepth 1 -name "desktop-theme-*" > /dev/null && \
+    plymouth_theme=$(tail -1 /var/log/desktop-theme-packages.log)
     # If there is no more desktop-theme package installed, remove the logfile
-    test -d /usr/share/desktop-theme-* || rm -f /var/log/desktop-theme-packages.log
+    find /usr/share -maxdepth 1 -name "desktop-theme-*" > /dev/null || rm -f /var/log/desktop-theme-packages.log
     # Set plymouth to previous theme
     if which plymouth-set-default-theme > /dev/null ; then
-        test -d /usr/share/desktop-theme-* && plymouth-set-default-theme $theme
-        test -d /usr/share/desktop-theme-* || plymouth-set-default-theme joy
+        find /usr/share -maxdepth 1 -name "desktop-theme-*" > /dev/null && plymouth-set-default-theme $plymouth_theme
+        find /usr/share -maxdepth 1 -name "desktop-theme-*" > /dev/null  || plymouth-set-default-theme joy
         test -d /usr/share/images/desktop-base || plymouth-set-default-theme -r 
         # Remove diversion - but only if there isn't any other theme package that needs it:
-        test -f /usr/share/desktop-base/profiles/kde-profile/share/config/.ksplashrc.*.id \
+            find /usr/share/desktop-base/profiles/kde-profile/share/config -maxdepth 1 -name ".ksplashrc.*.id" > /dev/null \ 
             || dpkg-divert --package desktop-theme-growing --remove --rename \
             --divert /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \