doinst.sh 779 B

12345678910111213141516171819202122232425262728
  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. if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
  17. if [ -x /usr/bin/gtk-update-icon-cache ]; then
  18. /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
  19. fi
  20. fi
  21. config opt/netbeans/etc/netbeans.conf.new
  22. config opt/netbeans/etc/netbeans.clusters.new
  23. config opt/netbeans/etc/netbeans.import.new