config() {
  NEW="$1"
  OLD="$(dirname $NEW)/$(basename $NEW .new)"
  if [ ! -r $OLD ]; then
    mv $NEW $OLD
  elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
    rm $NEW
  fi
}

config etc/fwupd/fwupd.conf.new
config etc/fwupd/remotes.d/lvfs-testing.conf.new
config etc/fwupd/remotes.d/lvfs.conf.new
config etc/fwupd/remotes.d/vendor-directory.conf.new
config etc/fwupd/bios-settings.d/README.md.new
config etc/grub.d/35_fwupd.new
( cd usr/doc/fwupd-2.0.20/fwupd ; rm -rf libfwupd )
( cd usr/doc/fwupd-2.0.20/fwupd ; ln -sf ../libfwupd libfwupd )
( cd usr/doc/fwupd-2.0.20/fwupd ; rm -rf libfwupdplugin )
( cd usr/doc/fwupd-2.0.20/fwupd ; ln -sf ../libfwupdplugin libfwupdplugin )
( cd usr/lib64 ; rm -rf libfwupd.so )
( cd usr/lib64 ; ln -sf libfwupd.so.3 libfwupd.so )
( cd usr/lib64 ; rm -rf libfwupd.so.3 )
( cd usr/lib64 ; ln -sf libfwupd.so.3.0.0 libfwupd.so.3 )
