slackbuilds_ponce/system/memtest86+/doinst.sh
Kyle Guinn edcf9c5771
system/memtest86+: Add GRUB autodetection script
Signed-off-by: Kyle Guinn <elyk03@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2022-12-17 09:14:02 +07:00

14 lines
384 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...
}
config etc/grub.d/20_memtest86+.new