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...
}

( cd usr/lib/firmware/raspberrypi/bootloader-2711 ; rm -rf beta )
( cd usr/lib/firmware/raspberrypi/bootloader-2711 ; ln -sf latest beta )
( cd usr/lib/firmware/raspberrypi/bootloader-2711 ; rm -rf critical )
( cd usr/lib/firmware/raspberrypi/bootloader-2711 ; ln -sf default critical )
( cd usr/lib/firmware/raspberrypi/bootloader-2711 ; rm -rf stable )
( cd usr/lib/firmware/raspberrypi/bootloader-2711 ; ln -sf latest stable )
( cd usr/lib/firmware/raspberrypi/bootloader-2712 ; rm -rf beta )
( cd usr/lib/firmware/raspberrypi/bootloader-2712 ; ln -sf latest beta )
( cd usr/lib/firmware/raspberrypi/bootloader-2712 ; rm -rf critical )
( cd usr/lib/firmware/raspberrypi/bootloader-2712 ; ln -sf default critical )
( cd usr/lib/firmware/raspberrypi/bootloader-2712 ; rm -rf stable )
( cd usr/lib/firmware/raspberrypi/bootloader-2712 ; ln -sf latest stable )
