chromium.kur-kos 918 B

1234567891011121314151617181920212223242526272829303132
  1. config() {
  2. NEW="$1"
  3. OLD="$(dirname $NEW)/$(basename $NEW .new)"
  4. # If there's no config file by that name, mv it over:
  5. if [ ! -r $OLD ]; then
  6. mv $NEW $OLD
  7. elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
  8. # toss the redundant copy
  9. rm $NEW
  10. fi
  11. # Otherwise, we leave the .new copy for the admin to consider...
  12. }
  13. config /etc/chromium/00-default.conf.new
  14. # Update the desktop database:
  15. if [ -x /usr/bin/update-desktop-database ]; then
  16. /usr/bin/update-desktop-database /usr/share/applications > /dev/null 2>&1
  17. fi
  18. # Update hicolor theme cache:
  19. if [ -d /usr/share/icons/hicolor ]; then
  20. if [ -x /usr/bin/gtk-update-icon-cache ]; then
  21. /usr/bin/gtk-update-icon-cache -f -t /usr/share/icons/hicolor 1> /dev/null 2> /dev/null
  22. fi
  23. fi
  24. # Update the mime database:
  25. if [ -x /usr/bin/update-mime-database ]; then
  26. /usr/bin/update-mime-database /usr/share/mime >/dev/null 2>&1
  27. fi