texlive-module:eclass correct missing if block
authorMikle Kolyada <zlogene@gentoo.org>
Sun, 23 Feb 2020 19:23:39 +0000 (22:23 +0300)
committerMikle Kolyada <zlogene@gentoo.org>
Sun, 23 Feb 2020 19:25:28 +0000 (22:25 +0300)
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
eclass/texlive-module.eclass

index 3f31f35e1abbd8a07980d6555f8b27f6d9a98778..5c4dec838d7712a53e55553e7a089c37635769ac 100644 (file)
@@ -163,7 +163,11 @@ texlive-module_add_format() {
        local name engine mode patterns options
        eval $@
        einfo "Appending to format.${PN}.cnf for $@"
-       [[ -d texmf-dist/fmtutil ]] || mkdir -p texmf-dist/fmtutil || die
+
+       if [[ ! -d texmf-dist/fmtutil ]]; then
+               mkdir -p texmf-dist/fmtutil || die
+       fi
+
        [[ -f texmf-dist/fmtutil/format.${PN}.cnf ]] || { echo "# Generated for ${PN}   by texlive-module.eclass" > texmf-dist/fmtutil/format.${PN}.cnf; }
        [[ -n ${TEXLIVE_MODULE_OPTIONAL_ENGINE} ]] && has ${engine} ${TEXLIVE_MODULE_OPTIONAL_ENGINE} && use !${engine} && mode="disabled"
        if [[ ${mode} = disabled ]]; then