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.2 )
( cd usr/lib64 ; ln -sf libasound.so.2.0.0 libasound.so.2 )
( cd usr/lib64 ; rm -rf libasound.so )
( cd usr/lib64 ; ln -sf libasound.so.2.0.0 libasound.so )
( cd usr/lib64 ; rm -rf libatopology.so.2 )
( cd usr/lib64 ; ln -sf libatopology.so.2.0.0 libatopology.so.2 )
( cd usr/lib64 ; rm -rf libatopology.so )
( cd usr/lib64 ; ln -sf libatopology.so.2.0.0 libatopology.so )
( cd usr/share/alsa/ucm2/conf.d/acp3xalc5682m98 ; rm -rf acp3xalc5682m98.conf )
( cd usr/share/alsa/ucm2/conf.d/acp3xalc5682m98 ; ln -sf ../../AMD/acp3xalc5682m98/acp3xalc5682m98.conf acp3xalc5682m98.conf )
( cd usr/share/alsa/ucm2/conf.d/acp5x ; rm -rf Valve-Jupiter-1.conf )
( cd usr/share/alsa/ucm2/conf.d/acp5x ; ln -sf ../../AMD/acp5x/acp5x.conf Valve-Jupiter-1.conf )
( cd usr/share/alsa/ucm2/conf.d/acp6x ; rm -rf acp6x.conf )
( cd usr/share/alsa/ucm2/conf.d/acp6x ; ln -sf ../../common/linked-card.conf acp6x.conf )
( cd usr/share/alsa/ucm2/conf.d/acp ; rm -rf acp.conf )
( cd usr/share/alsa/ucm2/conf.d/acp ; ln -sf ../../common/linked-card.conf acp.conf )
( cd usr/share/alsa/ucm2/conf.d/bdw-rt5677 ; rm -rf bdw-rt5677.conf )
( cd usr/share/alsa/ucm2/conf.d/bdw-rt5677 ; ln -sf ../../Intel/bdw-rt5677/bdw-rt5677.conf bdw-rt5677.conf )
( cd usr/share/alsa/ucm2/conf.d/broadwell-rt286 ; rm -rf broadwell-rt286.conf )
( cd usr/share/alsa/ucm2/conf.d/broadwell-rt286 ; ln -sf ../../Intel/broadwell-rt286/broadwell-rt286.conf broadwell-rt286.conf )
( cd usr/share/alsa/ucm2/conf.d/broxton-rt298 ; rm -rf broxton-rt298.conf )
( cd usr/share/alsa/ucm2/conf.d/broxton-rt298 ; ln -sf ../../Intel/broxton-rt298/broxton-rt298.conf broxton-rt298.conf )
( cd usr/share/alsa/ucm2/conf.d/bytcht-cx2072x ; rm -rf bytcht-cx2072x.conf )
( cd usr/share/alsa/ucm2/conf.d/bytcht-cx2072x ; ln -sf ../../Intel/bytcht-cx2072x/bytcht-cx2072x.conf bytcht-cx2072x.conf )
( cd usr/share/alsa/ucm2/conf.d/bytcht-es8316 ; rm -rf bytcht-es8316.conf )
( cd usr/share/alsa/ucm2/conf.d/bytcht-es8316 ; ln -sf ../../Intel/bytcht-es8316/bytcht-es8316.conf bytcht-es8316.conf )
( cd usr/share/alsa/ucm2/conf.d/bytcr-rt5640 ; rm -rf bytcr-rt5640.conf )
( cd usr/share/alsa/ucm2/conf.d/bytcr-rt5640 ; ln -sf ../../Intel/bytcr-rt5640/bytcr-rt5640.conf bytcr-rt5640.conf )
( cd usr/share/alsa/ucm2/conf.d/bytcr-rt5651 ; rm -rf bytcr-rt5651.conf )
( cd usr/share/alsa/ucm2/conf.d/bytcr-rt5651 ; ln -sf ../../Intel/bytcr-rt5651/bytcr-rt5651.conf bytcr-rt5651.conf )
( cd usr/share/alsa/ucm2/conf.d/bytcr-wm5102 ; rm -rf bytcr-wm5102.conf )
( cd usr/share/alsa/ucm2/conf.d/bytcr-wm5102 ; ln -sf ../../Intel/bytcr-wm5102/bytcr-wm5102.conf bytcr-wm5102.conf )
( cd usr/share/alsa/ucm2/conf.d/cht-bsw-rt5672 ; rm -rf cht-bsw-rt5672.conf )
( cd usr/share/alsa/ucm2/conf.d/cht-bsw-rt5672 ; ln -sf ../../Intel/cht-bsw-rt5672/cht-bsw-rt5672.conf cht-bsw-rt5672.conf )
( cd usr/share/alsa/ucm2/conf.d/chtmax98090 ; rm -rf chtmax98090.conf )
( cd usr/share/alsa/ucm2/conf.d/chtmax98090 ; ln -sf ../../Intel/chtmax98090/chtmax98090.conf chtmax98090.conf )
( cd usr/share/alsa/ucm2/conf.d/chtnau8824 ; rm -rf chtnau8824.conf )
( cd usr/share/alsa/ucm2/conf.d/chtnau8824 ; ln -sf ../../Intel/chtnau8824/chtnau8824.conf chtnau8824.conf )
( cd usr/share/alsa/ucm2/conf.d/chtrt5645 ; rm -rf chtrt5645.conf )
( cd usr/share/alsa/ucm2/conf.d/chtrt5645 ; ln -sf ../../Intel/chtrt5645/chtrt5645.conf chtrt5645.conf )
( cd usr/share/alsa/ucm2/conf.d/chtrt5650 ; rm -rf chtrt5650.conf )
( cd usr/share/alsa/ucm2/conf.d/chtrt5650 ; ln -sf ../../Intel/chtrt5650/chtrt5650.conf chtrt5650.conf )
( cd usr/share/alsa/ucm2/conf.d/DB410c ; rm -rf DB410c.conf )
( cd usr/share/alsa/ucm2/conf.d/DB410c ; ln -sf ../../Qualcomm/apq8016-sbc/apq8016-sbc.conf DB410c.conf )
( cd usr/share/alsa/ucm2/conf.d/DB820c ; rm -rf DB820c.conf )
( cd usr/share/alsa/ucm2/conf.d/DB820c ; ln -sf ../../Qualcomm/apq8096/apq8096.conf DB820c.conf )
( cd usr/share/alsa/ucm2/conf.d/hda-dsp ; rm -rf hda-dsp.conf )
( cd usr/share/alsa/ucm2/conf.d/hda-dsp ; ln -sf ../../Intel/hda-dsp/hda-dsp.conf hda-dsp.conf )
( cd usr/share/alsa/ucm2/conf.d/HDA-Intel ; rm -rf HDA-Intel.conf )
( cd usr/share/alsa/ucm2/conf.d/HDA-Intel ; ln -sf ../../HDA/HDA.conf HDA-Intel.conf )
( cd usr/share/alsa/ucm2/conf.d/kblrt5660 ; rm -rf kblrt5660.conf )
( cd usr/share/alsa/ucm2/conf.d/kblrt5660 ; ln -sf ../../Intel/kblrt5660/kblrt5660.conf kblrt5660.conf )
( cd usr/share/alsa/ucm2/conf.d/mt8192_mt6359 ; rm -rf mt8192_mt6359_rt1015p_rt5682.conf )
( cd usr/share/alsa/ucm2/conf.d/mt8192_mt6359 ; ln -sf ../../MediaTek/mt8192/mt6359-rt1015p-rt5682/mt8192_mt6359_rt1015p_rt5682.conf mt8192_mt6359_rt1015p_rt5682.conf )
( cd usr/share/alsa/ucm2/conf.d/mt8195_demo ; rm -rf mt8195_demo.conf )
( cd usr/share/alsa/ucm2/conf.d/mt8195_demo ; ln -sf ../../MediaTek/mt8195_demo/mt8195_demo.conf mt8195_demo.conf )
( cd usr/share/alsa/ucm2/conf.d/mt8365-evk ; rm -rf mt8365-evk.conf )
( cd usr/share/alsa/ucm2/conf.d/mt8365-evk ; ln -sf ../../MediaTek/mt8365-evk/mt8365-evk.conf mt8365-evk.conf )
( cd usr/share/alsa/ucm2/conf.d/mtk-rt5650 ; rm -rf mtk-rt5650.conf )
( cd usr/share/alsa/ucm2/conf.d/mtk-rt5650 ; ln -sf ../../MediaTek/mtk-rt5650/mtk-rt5650.conf mtk-rt5650.conf )
( cd usr/share/alsa/ucm2/conf.d/rk3399-gru-soun ; rm -rf rk3399-gru-soun.conf )
( cd usr/share/alsa/ucm2/conf.d/rk3399-gru-soun ; ln -sf ../../Rockchip/rk3399-gru-sound/rk3399-gru-sound.conf rk3399-gru-soun.conf )
( cd usr/share/alsa/ucm2/conf.d/rockchip_es8316 ; rm -rf rockchip_es8316.conf )
( cd usr/share/alsa/ucm2/conf.d/rockchip_es8316 ; ln -sf ../../Rockchip/es8316/es8316.conf rockchip_es8316.conf )
( cd usr/share/alsa/ucm2/conf.d/SC7180 ; rm -rf sc7180-rt5682-max98357a-1mic.conf )
( cd usr/share/alsa/ucm2/conf.d/SC7180 ; ln -sf ../../Qualcomm/sc7180/rt5682-max98357a/sc7180-rt5682-max98357a-1mic.conf sc7180-rt5682-max98357a-1mic.conf )
( cd usr/share/alsa/ucm2/conf.d/sc8280xp ; rm -rf sc8280xp.conf )
( cd usr/share/alsa/ucm2/conf.d/sc8280xp ; ln -sf ../../Qualcomm/sc8280xp/sc8280xp.conf sc8280xp.conf )
( cd usr/share/alsa/ucm2/conf.d/sdm845 ; rm -rf DB845c.conf )
( cd usr/share/alsa/ucm2/conf.d/sdm845 ; ln -sf ../../Qualcomm/sdm845/sdm845.conf DB845c.conf )
( cd usr/share/alsa/ucm2/conf.d/sdm845 ; rm -rf LENOVO-81JL-LenovoYOGAC630_13Q50-LNVNB161216.conf )
( cd usr/share/alsa/ucm2/conf.d/sdm845 ; ln -sf ../../Qualcomm/sdm845/Lenovo-YOGA-C630-13Q50.conf LENOVO-81JL-LenovoYOGAC630_13Q50-LNVNB161216.conf )
( cd usr/share/alsa/ucm2/conf.d/simple-card ; rm -rf Librem\ 5.conf )
( cd usr/share/alsa/ucm2/conf.d/simple-card ; ln -sf ../../NXP/iMX8/Librem_5/Librem\ 5.conf Librem\ 5.conf )
( cd usr/share/alsa/ucm2/conf.d/simple-card ; rm -rf Librem\ 5\ Devkit.conf )
( cd usr/share/alsa/ucm2/conf.d/simple-card ; ln -sf ../../NXP/iMX8/Librem_5_Devkit/Librem\ 5\ Devkit.conf Librem\ 5\ Devkit.conf )
( cd usr/share/alsa/ucm2/conf.d/simple-card ; rm -rf PinePhone.conf )
( cd usr/share/alsa/ucm2/conf.d/simple-card ; ln -sf ../../Allwinner/A64/PinePhone/PinePhone.conf PinePhone.conf )
( cd usr/share/alsa/ucm2/conf.d/simple-card ; rm -rf rk817_ext.conf )
( cd usr/share/alsa/ucm2/conf.d/simple-card ; ln -sf ../../Rockchip/rk817-sound/rk817-sound.conf rk817_ext.conf )
( cd usr/share/alsa/ucm2/conf.d/simple-card ; rm -rf rk817_int.conf )
( cd usr/share/alsa/ucm2/conf.d/simple-card ; ln -sf ../../Rockchip/rk817-sound/rk817-sound.conf rk817_int.conf )
( cd usr/share/alsa/ucm2/conf.d/simple-card ; rm -rf rockchip,es8316-codec.conf )
( cd usr/share/alsa/ucm2/conf.d/simple-card ; ln -sf ../../Rockchip/es8316/es8316.conf rockchip,es8316-codec.conf )
( cd usr/share/alsa/ucm2/conf.d/skylake-rt286 ; rm -rf skylake-rt286.conf )
( cd usr/share/alsa/ucm2/conf.d/skylake-rt286 ; ln -sf ../../Intel/skylake-rt286/skylake-rt286.conf skylake-rt286.conf )
( cd usr/share/alsa/ucm2/conf.d/sm8250 ; rm -rf Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf )
( cd usr/share/alsa/ucm2/conf.d/sm8250 ; ln -sf ../../Qualcomm/sm8250/Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf Qualcomm-RB5-WSA8815-Speakers-DMIC0.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-ehl-rt5660 ; rm -rf sof-ehl-rt5660.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-ehl-rt5660 ; ln -sf ../../Intel/sof-ehl-rt5660/sof-ehl-rt5660.conf sof-ehl-rt5660.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-essx8336 ; rm -rf sof-essx8336.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-essx8336 ; ln -sf ../../Intel/sof-essx8336/sof-essx8336.conf sof-essx8336.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-glkda7219ma ; rm -rf sof-glkda7219ma.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-glkda7219ma ; ln -sf ../../Intel/sof-glkda7219max/sof-glkda7219max.conf sof-glkda7219ma.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-hda-dsp ; rm -rf sof-hda-dsp.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-hda-dsp ; ln -sf ../../Intel/sof-hda-dsp/sof-hda-dsp.conf sof-hda-dsp.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-hda-dsp ; rm -rf sof-skl_hda_card.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-hda-dsp ; ln -sf ../../Intel/sof-hda-dsp/sof-hda-dsp.conf sof-skl_hda_card.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-mt8195_r101 ; rm -rf sof-mt8195_r1019_5682.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-mt8195_r101 ; ln -sf ../../MediaTek/mt8195-sof/mt6359-rt1019-rt5682/sof-mt8195-mt6359-rt1019-rt5682.conf sof-mt8195_r1019_5682.conf )
( cd usr/share/alsa/ucm2/conf.d ; rm -rf sof-skl_hda_card )
( cd usr/share/alsa/ucm2/conf.d ; ln -sf sof-hda-dsp sof-skl_hda_card )
( cd usr/share/alsa/ucm2/conf.d/SOF ; rm -rf SOF.conf )
( cd usr/share/alsa/ucm2/conf.d/SOF ; ln -sf ../../Intel/SOF/SOF.conf SOF.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-soundwire ; rm -rf sof-soundwire.conf )
( cd usr/share/alsa/ucm2/conf.d/sof-soundwire ; ln -sf ../../sof-soundwire/sof-soundwire.conf sof-soundwire.conf )
( cd usr/share/alsa/ucm2/conf.d/tegra ; rm -rf Acer\ Iconia\ Tab\ A500\ WM8903.conf )
( cd usr/share/alsa/ucm2/conf.d/tegra ; ln -sf ../../Tegra/wm8903/Acer-A500.conf Acer\ Iconia\ Tab\ A500\ WM8903.conf )
( cd usr/share/alsa/ucm2/conf.d/tegra ; rm -rf ASUS\ Google\ Nexus\ 7\ ALC5642.conf )
( cd usr/share/alsa/ucm2/conf.d/tegra ; ln -sf ../../Tegra/rt5640/Google-Nexus-7.conf ASUS\ Google\ Nexus\ 7\ ALC5642.conf )
( cd usr/share/alsa/ucm2/conf.d/tegra ; rm -rf Compal\ PAZ00.conf )
( cd usr/share/alsa/ucm2/conf.d/tegra ; ln -sf ../../Tegra/alc5632/alc5632.conf Compal\ PAZ00.conf )
( cd usr/share/alsa/ucm2/conf.d/tegra ; rm -rf GoogleNyanBig.conf )
( cd usr/share/alsa/ucm2/conf.d/tegra ; ln -sf ../../Tegra/max98090/max98090.conf GoogleNyanBig.conf )
( cd usr/share/alsa/ucm2/conf.d/tegra ; rm -rf GoogleNyanBlaze.conf )
( cd usr/share/alsa/ucm2/conf.d/tegra ; ln -sf ../../Tegra/max98090/max98090.conf GoogleNyanBlaze.conf )
( cd usr/share/alsa/ucm2/conf.d/tegra-hda ; rm -rf tegra-hda.conf )
( cd usr/share/alsa/ucm2/conf.d/tegra-hda ; ln -sf ../../Tegra/tegra-hda/tegra-hda.conf tegra-hda.conf )
( cd usr/share/alsa/ucm2/conf.d/USB-Audio ; rm -rf USB-Audio.conf )
( cd usr/share/alsa/ucm2/conf.d/USB-Audio ; ln -sf ../../USB-Audio/USB-Audio.conf USB-Audio.conf )
( cd usr/share/alsa/ucm2/conf.d/VEYRON-I2S ; rm -rf VEYRON-I2S.conf )
( cd usr/share/alsa/ucm2/conf.d/VEYRON-I2S ; ln -sf ../../Rockchip/max98090/max98090.conf VEYRON-I2S.conf )
( cd usr/share/alsa/ucm2/module ; rm -rf snd_soc_apq8016_sbc.conf )
( cd usr/share/alsa/ucm2/module ; ln -sf ../Qualcomm/apq8016-sbc/apq8016-sbc.conf snd_soc_apq8016_sbc.conf )
( cd usr/share/alsa/ucm2/module ; rm -rf snd_soc_apq8096.conf )
( cd usr/share/alsa/ucm2/module ; ln -sf ../Qualcomm/apq8096/apq8096.conf snd_soc_apq8096.conf )
( cd usr/share/alsa/ucm2/module ; rm -rf snd_soc_omap_abe_twl6040.conf )
( cd usr/share/alsa/ucm2/module ; ln -sf ../OMAP/abe-twl6040/abe-twl6040.conf snd_soc_omap_abe_twl6040.conf )
( cd usr/share/alsa/ucm2/module ; rm -rf snd_soc_rk3399_gru_sound.conf )
( cd usr/share/alsa/ucm2/module ; ln -sf ../Rockchip/rk3399-gru-sound/rk3399-gru-sound.conf snd_soc_rk3399_gru_sound.conf )
( cd usr/share/alsa/ucm2/module ; rm -rf snd_soc_rockchip_max98090.conf )
( cd usr/share/alsa/ucm2/module ; ln -sf ../Rockchip/max98090/max98090.conf snd_soc_rockchip_max98090.conf )
( cd usr/share/alsa/ucm2/module ; rm -rf snd_soc_sdm845.conf )
( cd usr/share/alsa/ucm2/module ; ln -sf ../Qualcomm/sdm845/sdm845.conf snd_soc_sdm845.conf )
( cd usr/share/alsa/ucm2/module ; rm -rf snd_soc_snow.conf )
( cd usr/share/alsa/ucm2/module ; ln -sf ../Samsung/snow/snow.conf snd_soc_snow.conf )
( cd usr/share/alsa/ucm2/module ; rm -rf snd_soc_tegra_alc5632.conf )
( cd usr/share/alsa/ucm2/module ; ln -sf ../Tegra/alc5632/alc5632.conf snd_soc_tegra_alc5632.conf )
( cd usr/share/alsa/ucm2/module ; rm -rf snd_soc_tegra_max98090.conf )
( cd usr/share/alsa/ucm2/module ; ln -sf ../Tegra/max98090/max98090.conf snd_soc_tegra_max98090.conf )
