doinst.sh 708 B

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