doinst.sh 706 B

12345678910111213141516171819202122232425
  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/xdg/lightspark.conf.new
  14. if [ -x /usr/bin/update-desktop-database ]; then
  15. /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
  16. fi
  17. if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
  18. if [ -x /usr/bin/gtk-update-icon-cache ]; then
  19. /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
  20. fi
  21. fi