doinst.sh 539 B

123456789101112131415161718192021
  1. config() {
  2. NEW="$1"
  3. OLD="$(dirname $NEW)/$(basename $NEW .new)"
  4. if [ ! -r $OLD ]; then
  5. mv $NEW $OLD
  6. elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
  7. rm $NEW
  8. fi
  9. }
  10. if [ -x /usr/bin/update-desktop-database ]; then
  11. /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
  12. fi
  13. if [ -x /usr/bin/update-mime-database ]; then
  14. /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
  15. fi
  16. config opt/eclipse-platform/configuration/config.ini.new
  17. config opt/eclipse-platform/eclipse.ini.new