
available()
{
  which "$1" >/dev/null 2>&1
}

if available update-desktop-database; then
  update-desktop-database -q /usr/share/applications
fi

if available gtk-update-icon-cache; then
  gtk-update-icon-cache -tq /usr/share/icons/hicolor
fi
