slackware-current/source/a/grub/doinst.sh
Patrick J Volkerding a6160c7f56 Fri Sep 10 18:58:52 UTC 2021
a/grub-2.06-x86_64-4.txz:  Rebuilt.
  Install file in /etc/grub.d as .new so that they won't be clobbered by
  future package updates.
  Patch grub-mkconfig to skip .new files in /etc/grub.d.
  Thanks to denydias.
d/bison-3.7.6-x86_64-1.txz:  Upgraded.
  Reverted bison-3.8 since it breaks building glibc. Looks like I picked the
  wrong week to upgrade bison. ;-)
  Thanks to nobodino.
l/jansson-2.14-x86_64-1.txz:  Upgraded.
l/libcap-2.57-x86_64-1.txz:  Upgraded.
l/liburing-2.1-x86_64-1.txz:  Upgraded.
xap/libnma-1.8.32-x86_64-2.txz:  Rebuilt.
  Added glib-compile-schemas to the install script. Thanks to bormant.
xap/network-manager-applet-1.24.0-x86_64-2.txz:  Rebuilt.
  Removed glib-compile-schemas from the install script. Thanks to bormant.
2021-09-11 08:59:54 +02:00

18 lines
469 B
Bash

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...
}
# Process config files in etc/grub.d/:
for file in etc/grub.d/*.new ; do
config $file
done
config etc/default/grub.new