[wastesedge] Adapt the scriptlets to the new guidelines

Mathieu Bridon bochecha at fedoraproject.org
Fri Sep 21 06:45:08 UTC 2012


commit ad6ffd4d1121b9656e2f19fd9f7aa1b15b79ab51
Author: Mathieu Bridon <bochecha at fedoraproject.org>
Date:   Fri Sep 21 11:28:50 2012 +0800

    Adapt the scriptlets to the new guidelines

 wastesedge.spec |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/wastesedge.spec b/wastesedge.spec
index d316832..7a89b42 100644
--- a/wastesedge.spec
+++ b/wastesedge.spec
@@ -80,18 +80,17 @@ desktop-file-install --vendor=""                      \
 
 
 %post
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-    %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
-fi
-
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
 
 %postun
-touch --no-create %{_datadir}/icons/hicolor
-if [ -x %{_bindir}/gtk-update-icon-cache ]; then
-    %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
 fi
 
+%posttrans
+/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+
 
 %changelog
 * Sun Jul 22 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3.4-0.18


More information about the scm-commits mailing list