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 lib/firmware/intel ; rm -rf sof-tplg )
( cd lib/firmware/intel ; ln -sf sof-tplg-v1.6.1 sof-tplg )
( cd lib/firmware/intel/sof/community ; rm -rf sof-apl.ri )
( cd lib/firmware/intel/sof/community ; ln -sf ../v1.6.1/public-signed/sof-apl-v1.6.1.ri sof-apl.ri )
( cd lib/firmware/intel/sof/community ; rm -rf sof-cfl.ri )
( cd lib/firmware/intel/sof/community ; ln -sf ../v1.6.1/public-signed/sof-cnl-v1.6.1.ri sof-cfl.ri )
( cd lib/firmware/intel/sof/community ; rm -rf sof-cml.ri )
( cd lib/firmware/intel/sof/community ; ln -sf ../v1.6.1/public-signed/sof-cnl-v1.6.1.ri sof-cml.ri )
( cd lib/firmware/intel/sof/community ; rm -rf sof-cnl.ri )
( cd lib/firmware/intel/sof/community ; ln -sf ../v1.6.1/public-signed/sof-cnl-v1.6.1.ri sof-cnl.ri )
( cd lib/firmware/intel/sof/community ; rm -rf sof-ehl.ri )
( cd lib/firmware/intel/sof/community ; ln -sf ../v1.6.1/public-signed/sof-tgl-v1.6.1.ri sof-ehl.ri )
( cd lib/firmware/intel/sof/community ; rm -rf sof-glk.ri )
( cd lib/firmware/intel/sof/community ; ln -sf ../v1.6.1/public-signed/sof-apl-v1.6.1.ri sof-glk.ri )
( cd lib/firmware/intel/sof/community ; rm -rf sof-icl.ri )
( cd lib/firmware/intel/sof/community ; ln -sf ../v1.6.1/public-signed/sof-icl-v1.6.1.ri sof-icl.ri )
( cd lib/firmware/intel/sof/community ; rm -rf sof-jsl.ri )
( cd lib/firmware/intel/sof/community ; ln -sf ../v1.6.1/public-signed/sof-jsl-v1.6.1.ri sof-jsl.ri )
( cd lib/firmware/intel/sof/community ; rm -rf sof-tgl.ri )
( cd lib/firmware/intel/sof/community ; ln -sf ../v1.6.1/public-signed/sof-tgl-v1.6.1.ri sof-tgl.ri )
( cd lib/firmware/intel/sof ; rm -rf sof-apl.ri )
( cd lib/firmware/intel/sof ; ln -sf v1.6.1/intel-signed/sof-apl-v1.6.1.ri sof-apl.ri )
( cd lib/firmware/intel/sof ; rm -rf sof-bdw.ri )
( cd lib/firmware/intel/sof ; ln -sf v1.6.1/sof-bdw-v1.6.1.ri sof-bdw.ri )
( cd lib/firmware/intel/sof ; rm -rf sof-byt.ri )
( cd lib/firmware/intel/sof ; ln -sf v1.6.1/sof-byt-v1.6.1.ri sof-byt.ri )
( cd lib/firmware/intel/sof ; rm -rf sof-cfl.ri )
( cd lib/firmware/intel/sof ; ln -sf v1.6.1/intel-signed/sof-cnl-v1.6.1.ri sof-cfl.ri )
( cd lib/firmware/intel/sof ; rm -rf sof-cht.ri )
( cd lib/firmware/intel/sof ; ln -sf v1.6.1/sof-cht-v1.6.1.ri sof-cht.ri )
( cd lib/firmware/intel/sof ; rm -rf sof-cml.ri )
( cd lib/firmware/intel/sof ; ln -sf v1.6.1/intel-signed/sof-cnl-v1.6.1.ri sof-cml.ri )
( cd lib/firmware/intel/sof ; rm -rf sof-cnl.ri )
( cd lib/firmware/intel/sof ; ln -sf v1.6.1/intel-signed/sof-cnl-v1.6.1.ri sof-cnl.ri )
( cd lib/firmware/intel/sof ; rm -rf sof-ehl.ri )
( cd lib/firmware/intel/sof ; ln -sf v1.6.1/intel-signed/sof-ehl-v1.6.1.ri sof-ehl.ri )
( cd lib/firmware/intel/sof ; rm -rf sof-glk.ri )
( cd lib/firmware/intel/sof ; ln -sf v1.6.1/intel-signed/sof-apl-v1.6.1.ri sof-glk.ri )
( cd lib/firmware/intel/sof ; rm -rf sof-icl.ri )
( cd lib/firmware/intel/sof ; ln -sf v1.6.1/intel-signed/sof-icl-v1.6.1.ri sof-icl.ri )
( cd lib/firmware/intel/sof ; rm -rf sof-jsl.ri )
( cd lib/firmware/intel/sof ; ln -sf v1.6.1/intel-signed/sof-jsl-v1.6.1.ri sof-jsl.ri )
( cd lib/firmware/intel/sof ; rm -rf sof-tgl.ri )
( cd lib/firmware/intel/sof ; ln -sf v1.6.1/intel-signed/sof-tgl-v1.6.1.ri sof-tgl.ri )
