From: Frank Brehm Date: Wed, 15 Nov 2023 14:08:23 +0000 (+0100) Subject: Setting tesflags=nodocs in dnf.conf X-Git-Tag: 3.2.1~8 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=e1cd5cf895cfbf09ee3544ce7380e622e7dd998b;p=pixelpark%2Fcreate-vmware-tpl.git Setting tesflags=nodocs in dnf.conf --- diff --git a/snippets/tpl.120.config_yum.sh b/snippets/tpl.120.config_yum.sh index 3502d7e..d6a1054 100644 --- a/snippets/tpl.120.config_yum.sh +++ b/snippets/tpl.120.config_yum.sh @@ -50,6 +50,20 @@ config_yum() { changed="y" fi + if grep --perl-regexp -i --quiet '^\s*tsflags\s*=' "${cfg_file}" ; then + if grep --perl-regexp -i --quiet '^\s*tsflags\s*=\s*nodocs' "${cfg_file}" ; then + echo + echo "Modifying tsflags in '${cfg_file}' ..." + sed -i -e 's/^\s*tsflags\s*=.*/tsflags=nodocs/i' "${cfg_file}" + changed="y" + fi + else + echo + echo "Adding 'tsflags=nodocs' to '${cfg_file}' ..." + echo 'tsflags=nodocs' >> "${cfg_file}" + changed="y" + fi + if [[ "${changed}" ]] ; then echo echo "New content:"