From e1cd5cf895cfbf09ee3544ce7380e622e7dd998b Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 15 Nov 2023 15:08:23 +0100 Subject: [PATCH] Setting tesflags=nodocs in dnf.conf --- snippets/tpl.120.config_yum.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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:" -- 2.39.5