blob: 7e532d2b3b04f89bc2508ee189a546ea3476f738 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/bin/sh
# Update icon cache
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache -f -t /usr/share/icons/hicolor || :
fi
# Update desktop database
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database -q /usr/share/applications || :
fi
# Update mime database
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database /usr/share/mime || :
fi
# Try XDG icon cache update if available
if [ -x /usr/bin/xdg-icon-resource ]; then
/usr/bin/xdg-icon-resource forceupdate --theme hicolor || :
fi
# Clear icon cache for current user if logged in
if [ ! -z "$SUDO_USER" ]; then
su "$SUDO_USER" -c 'gtk-update-icon-cache -f -t ~/.local/share/icons/hicolor 2>/dev/null || :'
fi
|