>From eed457541118eb5c2fd43a63597b2b3b5fc21531 Mon Sep 17 00:00:00 2001 From: Szavai Gyula Date: Thu, 12 Jun 2014 08:32:45 +0200 Subject: [PATCH] postinst: cross-package texlive script consolidation --- lib/src_postinst.cygpart | 40 ++++++++++++++++++++++++---------------- 1 files changed, 24 insertions(+), 16 deletions(-) diff --git a/lib/src_postinst.cygpart b/lib/src_postinst.cygpart index 6188899..25cdb8c 100644 --- a/lib/src_postinst.cygpart +++ b/lib/src_postinst.cygpart @@ -327,10 +327,10 @@ __prep_mateconf_schemas() { __prep_texlive() { local d fmt fmts map maps - dodir /etc/postinstall /etc/preremove + dodir /etc/postinstall /etc/postinstall/texlive /etc/preremove - cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF - /usr/bin/mktexlsr + cat >> ${D}/etc/postinstall/texlive/${PN}.sh <<-_EOF + 10 /usr/bin/mktexlsr _EOF fmts=$(__config_get texlive_fmts) @@ -340,33 +340,33 @@ __prep_texlive() { then for map in $maps do - cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF - /usr/bin/updmap-sys --nohash --nomkmap --enable $map + cat >> ${D}/etc/postinstall/texlive/${PN}.sh <<-_EOF + 20 /usr/bin/updmap-sys --nohash --nomkmap --enable $map _EOF cat >> ${D}/etc/preremove/${PN}.sh <<-_EOF /usr/bin/updmap-sys --nohash --nomkmap --disable ${map#*=} _EOF done - cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF - /usr/bin/updmap-sys --nohash --syncwithtrees - /usr/bin/updmap-sys --nohash - /usr/bin/mktexlsr + cat >> ${D}/etc/postinstall/texlive/${PN}.sh <<-_EOF + 30 /usr/bin/updmap-sys --nohash --syncwithtrees + 33 /usr/bin/updmap-sys --nohash + 36 /usr/bin/mktexlsr _EOF fi if [ -n "${fmts#0}" ] then for fmt in $fmts do - cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF - /usr/bin/fmtutil-sys --enablefmt $fmt - /usr/bin/fmtutil-sys --byfmt $fmt + cat >> ${D}/etc/postinstall/texlive/${PN}.sh <<-_EOF + 50 /usr/bin/fmtutil-sys --enablefmt $fmt + 53 /usr/bin/fmtutil-sys --byfmt $fmt _EOF cat >> ${D}/etc/preremove/${PN}.sh <<-_EOF /usr/bin/fmtutil-sys --disablefmt $fmt _EOF done - cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF - /usr/bin/mktexlsr + cat >> ${D}/etc/postinstall/texlive/${PN}.sh <<-_EOF + 60 /usr/bin/mktexlsr _EOF fi @@ -374,11 +374,19 @@ __prep_texlive() { do if [ -d ${D}${d} ] then - cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF - /usr/bin/fc-cache -f $d + cat >> ${D}/etc/postinstall/texlive/${PN}.sh <<-_EOF + 70 /usr/bin/fc-cache -f $d _EOF fi done + + cat >> ${D}/etc/postinstall/${PN}.sh <<-_EOF + if [ -d /etc/postinstall/texlive/ ] + then + cat /etc/postinstall/texlive/*.sh | sort -u | cut -d ' ' -f 2- | sh + rm -R /etc/postinstall/texlive/ + fi + _EOF } #****P* Postinstall/X Sessions -- 1.7.9