config() { NEW="$1" OLD="$(dirname $NEW)/$(basename $NEW .new)" # If there's no config file by that name, mv it over: if [ ! -r $OLD ]; then mv $NEW $OLD elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy rm $NEW fi # Otherwise, we leave the .new copy for the admin to consider... } config etc/openjdk11/logging.properties.new config etc/openjdk11/net.properties.new config etc/openjdk11/sound.properties.new config etc/openjdk11/management/jmxremote.access.new config etc/openjdk11/management/jmxremote.password.template.new config etc/openjdk11/management/management.properties.new config etc/openjdk11/security/policy/unlimited/default_local.policy.new config etc/openjdk11/security/policy/unlimited/default_US_export.policy.new config etc/openjdk11/security/policy/limited/default_local.policy.new config etc/openjdk11/security/policy/limited/default_US_export.policy.new config etc/openjdk11/security/policy/limited/exempt_local.policy.new config etc/openjdk11/security/java.security.new config etc/openjdk11/security/java.policy.new if [ -x usr/bin/update-desktop-database ]; then chroot . /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then if [ -x usr/bin/gtk-update-icon-cache ]; then chroot . /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1 fi fi