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/asound.conf.new
( cd usr/lib64 ; rm -rf libasound.so )
( cd usr/lib64 ; ln -sf libasound.so.2.0.0 libasound.so )
( cd usr/lib64 ; rm -rf libasound.so.2 )
( cd usr/lib64 ; ln -sf libasound.so.2.0.0 libasound.so.2 )
( cd usr/lib64 ; rm -rf libatopology.so )
( cd usr/lib64 ; ln -sf libatopology.so.2.0.0 libatopology.so )
( cd usr/lib64 ; rm -rf libatopology.so.2 )
( cd usr/lib64 ; ln -sf libatopology.so.2.0.0 libatopology.so.2 )
( cd usr/share/alsa/ucm2/HDA-Intel ; rm -rf HDAudio-Gigabyte-ALC1220DualCodecs.conf )
( cd usr/share/alsa/ucm2/HDA-Intel ; ln -sf HDAudio-DualCodecs.conf HDAudio-Gigabyte-ALC1220DualCodecs.conf )
( cd usr/share/alsa/ucm2/HDA-Intel ; rm -rf HDAudio-Lenovo-DualCodecs.conf )
( cd usr/share/alsa/ucm2/HDA-Intel ; ln -sf HDAudio-DualCodecs.conf HDAudio-Lenovo-DualCodecs.conf )
( cd usr/share/alsa/ucm2/cht-bsw-rt5672 ; rm -rf LENOVO-20BN002QGE-ThinkPad8-20BN002QGE.conf )
( cd usr/share/alsa/ucm2/cht-bsw-rt5672 ; ln -sf cht-bsw-rt5672-stereo-dmic2.conf LENOVO-20BN002QGE-ThinkPad8-20BN002QGE.conf )
( cd usr/share/alsa/ucm2/cht-bsw-rt5672 ; rm -rf LENOVO-20BN002QGE-ThinkPad8.conf )
( cd usr/share/alsa/ucm2/cht-bsw-rt5672 ; ln -sf cht-bsw-rt5672-stereo-dmic2.conf LENOVO-20BN002QGE-ThinkPad8.conf )
( cd usr/share/alsa/ucm2/chtnau8824 ; rm -rf PIPO-W2S-Defaultstring-CherryTrailCR.conf )
( cd usr/share/alsa/ucm2/chtnau8824 ; ln -sf chtnau8824-mono.conf PIPO-W2S-Defaultstring-CherryTrailCR.conf )
( cd usr/share/alsa/ucm2/chtnau8824 ; rm -rf cube-i1_TF-Defaultstring-CherryTrailCR.conf )
( cd usr/share/alsa/ucm2/chtnau8824 ; ln -sf chtnau8824-mono.conf cube-i1_TF-Defaultstring-CherryTrailCR.conf )
( cd usr/share/alsa/ucm2/chtrt5645 ; rm -rf ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN.conf )
( cd usr/share/alsa/ucm2/chtrt5645 ; ln -sf chtrt5645-dmic1.conf ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN.conf )
( cd usr/share/alsa/ucm2/chtrt5645 ; rm -rf ASUSTeKCOMPUTERINC.-T100HAN-1.0.conf )
( cd usr/share/alsa/ucm2/chtrt5645 ; ln -sf chtrt5645-dmic1.conf ASUSTeKCOMPUTERINC.-T100HAN-1.0.conf )
( cd usr/share/alsa/ucm2/chtrt5645 ; rm -rf LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216.conf )
( cd usr/share/alsa/ucm2/chtrt5645 ; ln -sf chtrt5645-dmic2.conf LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216.conf )
( cd usr/share/alsa/ucm2/chtrt5645 ; rm -rf MEDION-E1239TMD60568-0.1-Wingman.conf )
( cd usr/share/alsa/ucm2/chtrt5645 ; ln -sf chtrt5645-dmic2.conf MEDION-E1239TMD60568-0.1-Wingman.conf )
( cd usr/share/alsa/ucm2/chtrt5645 ; rm -rf TECLAST-X80Pro-Defaultstring-CherryTrailCR.conf )
( cd usr/share/alsa/ucm2/chtrt5645 ; ln -sf chtrt5645-mono-speaker-analog-mic.conf TECLAST-X80Pro-Defaultstring-CherryTrailCR.conf )
( cd usr/share/alsa/ucm2/chtrt5645 ; rm -rf gpd-win-pocket-rt5645.conf )
( cd usr/share/alsa/ucm2/chtrt5645 ; ln -sf chtrt5645-mono-speaker-analog-mic.conf gpd-win-pocket-rt5645.conf )
