Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=gnometesting.git;a=commitdiff;h=94e0b02ae0e29acb62e7f5b349a7886679cf94e1

commit 94e0b02ae0e29acb62e7f5b349a7886679cf94e1
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Thu Jan 13 14:08:23 2011 +0000

gnome-scriplet.install
*added gtk+3

diff --git a/source/include/gnome-scriptlet.install 
b/source/include/gnome-scriptlet.install
index 5020fbe..6dcaa25 100644
--- a/source/include/gnome-scriptlet.install
+++ b/source/include/gnome-scriptlet.install
@@ -1,6 +1,39 @@
schemas=($_F_gnome_schemas)
entries=($_F_gnome_entries)

+UpdateDesktopDatabase()
+{
+       if [ -f /usr/bin/update-desktop-database ]
+       then
+               echo -n "updating desktop database..."
+               if update-desktop-database > /dev/null 2>&1 ; then
+                       echo " done."
+               else
+                       echo " failed."
+               fi
+       fi
+}
+UpdateIconCache()
+{
+       if [ -f /usr/bin/gtk-update-icon-cache ]
+       then
+               echo -n "updating hicolor icon cache..."
+               if gtk-update-icon-cache -f -t /usr/share/icons/hicolor > 
/dev/null 2>&1 ; then
+                       echo " done."
+               else
+                       echo " failed."
+               fi
+       fi
+       if [ -f /usr/bin/gtk-update-icon-cache-3.0 ]
+       then
+               echo -n "updating hicolor icon cache gtk+3..."
+               if gtk-update-icon-cache-3.0 -f -t /usr/share/icons/hicolor > 
/dev/null 2>&1 ; then
+                       echo " done."
+               else
+                       echo " failed."
+               fi
+       fi
+}
post_install()
{
if [ ${#schemas[*]} -gt 0 ]; then
@@ -30,12 +63,7 @@ post_install()
echo "done."
fi
if [ -n "$_F_gnome_desktop" ]; then
-               echo -n "updating desktop database..."
-               if update-desktop-database > /dev/null 2>&1 ; then
-                       echo " done."
-               else
-                       echo " failed."
-               fi
+               UpdateDesktopDatabase
fi
if [ -n "$_F_gnome_scrollkeeper" ]; then
echo -n "updating rarian database..."
@@ -54,12 +82,7 @@ post_install()
fi
fi
if [ -n "$_F_gnome_iconcache" ]; then
-               echo -n "updating hicolor icon cache..."
-               if gtk-update-icon-cache -f -t /usr/share/icons/hicolor > 
/dev/null 2>&1 ; then
-                       echo " done."
-               else
-                       echo " failed."
-               fi
+               UpdateIconCache
fi
}

@@ -100,12 +123,7 @@ pre_remove() {
post_remove()
{
if [ -n "$_F_gnome_desktop" ]; then
-               echo -n "updating desktop database..."
-               if update-desktop-database > /dev/null 2>&1 ; then
-                       echo " done."
-               else
-                       echo " failed."
-               fi
+               UpdateDesktopDatabase
fi
if [ -n "$_F_gnome_scrollkeeper" ]; then
echo -n "updating rarian database..."
@@ -124,12 +142,7 @@ post_remove()
fi
fi
if [ -n "$_F_gnome_iconcache" ]; then
-               echo -n "updating hicolor icon cache..."
-               if gtk-update-icon-cache -f -t /usr/share/icons/hicolor > 
/dev/null 2>&1 ; then
-                       echo " done."
-               else
-                       echo " failed."
-               fi
+               UpdateIconCache
fi
}
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to