diff options
author | Karl Berry <karl@freefriends.org> | 2008-06-09 20:12:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-06-09 20:12:47 +0000 |
commit | c2ded34c4ac6a32fbed94b870481aaf9667fc227 (patch) | |
tree | cc7b9d209a306f44bc962ea8d7357307b9460ca9 /Master/tlpkg/bin/tl-update-auto | |
parent | 07b1dd24a6c6ca7ac335c56b3cc3127bd7910619 (diff) |
move autoupdate scripts to new tools bindir
git-svn-id: svn://tug.org/texlive/trunk@8623 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/bin/tl-update-auto')
-rwxr-xr-x | Master/tlpkg/bin/tl-update-auto | 179 |
1 files changed, 179 insertions, 0 deletions
diff --git a/Master/tlpkg/bin/tl-update-auto b/Master/tlpkg/bin/tl-update-auto new file mode 100755 index 00000000000..24a98a46c32 --- /dev/null +++ b/Master/tlpkg/bin/tl-update-auto @@ -0,0 +1,179 @@ +#!/bin/sh +# $Id$ +# Public domain. Originally written 2003, Karl Berry. +# +# Deal with files that are automatically updated in one way or another. +# New files need to be added manually, doesn't happen often enough. + +PATH=/usr/local/bin:$PATH; export PATH +umask 0 + +chicken=echo +chicken= +cp="cp -fv" +diff="diff -U 2" + +tools=`cd \`dirname $0\` && /bin/pwd` + +# most stuff is in Master. +Master=`cd $tools/../../Master && /bin/pwd` +cd $Master || exit 1 + +temp=/tmp/ua$$ +trap "rm -f $temp*" 0 1 2 15 + +update_list= + +# autogenerate README.EN from readme.html. +# +$tools/htmltext <readme.en.html >$temp +if $diff README.EN $temp >$temp.en.diff; then + echo " README.EN ok." +else + echo "will update README.EN." + $chicken $cp $temp README.EN + update_list="$update_list README.EN" +fi + + +# English FAQ from ctan mirror on tug.org. +# +faqmaster=/home/ftp/tex-archive/help/uk-tex-faq +faqslave=texmf-doc/doc/english/FAQ-en +for f in $faqmaster/*; do + # ignore some of the generated files + echo $f | egrep '(tar.gz|dvi|ps|letterfaq.pdf)$' >/dev/null \ + && continue + + basef=`basename $f` + faqslavef=$faqslave/$basef + if $diff $faqslavef $f >$temp.$basef.diff; then + echo " $faqslavef ok." + else + $chicken $cp $f $faqslavef + update_list="$update_list $faqslavef" + fi +done +# for now, don't bother auto-updating the html files. + + +# modes.mf from elsewhere on tug.org. +# +modesmaster=/home/ftp/tex/modes.mf +modesslave=texmf-dist/metafont/misc/modes.mf +# +if $diff $modesslave $modesmaster >$temp.modes.diff; then + echo " $modesslave ok." +else + $chicken $cp $modesmaster $modesslave + update_list="$update_list $modesslave" +fi + + +# texinfo.tex from elsewhere on tug.org. +# +tximaster=/home/ftp/tex/texinfo.tex +txislave=texmf-dist/tex/texinfo/texinfo.tex +# +if $diff $txislave $tximaster >$temp.txi.diff; then + echo " $txislave ok." +else + $chicken $cp $tximaster $txislave + update_list="$update_list $txislave" +fi + + +# fontname from elsewhere on tug.org. +# +fontnamemaster=/home/httpd/html/fontname +fontnamedocslave=texmf-dist/doc/fontname +# +for basef in ChangeLog Makefile bitstrea.aka \ + fontname.pdf fontname.html fontname.texi; do + fontnameslavef=$fontnamedocslave/$basef + if $diff $fontnamemaster/$basef $fontnameslavef >$temp.$basef.diff; then + echo " $fontnameslavef ok." + else + $chicken $cp $fontnamemaster/$basef $fontnameslavef + update_list="$update_list $fontnameslavef" + fi +done + +# fontname runtime files. +# +fontnamemapslave=texmf-dist/fonts/map/fontname +# +files=`cd $fontnamemaster && ls *.map` +for basef in $files; do + test $basef = wolfram.map && continue # obsolete for TL + fontnamemapslavef=$fontnamemapslave/$basef + if $diff $fontnamemaster/$basef $fontnamemapslavef >$temp.$basef.diff; then + echo " $fontnamemapslavef ok." + else + $chicken $cp $fontnamemaster/$basef $fontnamemapslavef + update_list="$update_list $fontnamemapslavef" + fi +done + +fontnameencslave=texmf-dist/fonts/enc/dvips/base +# +files=`cd $fontnamemaster && ls *.enc | egrep -vw '(groff|t5).enc'` +for basef in $files; do + fontnameencslavef=$fontnameencslave/$basef + if $diff $fontnameencslavef $fontnamemaster/$basef >$temp.$basef.diff; then + echo " $fontnameencslavef ok." + else + $chicken $cp $fontnamemaster/$basef $fontnameencslavef + update_list="$update_list $fontnameencslavef" + fi +done + + +# config.{guess,sub} from GNU. +# +for gnuconf in config.guess config.sub; do + url="http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/$gnuconf?rev=HEAD&content-type=text/plain" + wget -O $temp $url >$temp.2 2>&1 + if test ! -s $temp; then + echo "$0: skipping, could not retrieve $gnuconf:" >&2 + cat $temp.2 + continue + fi + if $diff $gnuconf $temp >$temp.$gnuconf.diff; then + echo " $gnuconf ok." + else + $chicken $cp $temp $gnuconf + update_list="$update_list $gnuconf" + + # find all copies in source. + alldev="`find ../Build/source -name $gnuconf`" + for f in $alldev; do + $chicken $cp $gnuconf $f + done + update_list="$update_list $alldev" + fi +done + + +# doc.html. +# +$tools/mkdocindex | tee $temp.doc | grep -v '<small>Generated' >$temp.doc.new +# +grep -v '<small>Generated' doc.html >$temp.doc.cur +if $diff $temp.doc.cur $temp.doc.new >$temp.doc.diff; then + echo " doc.html ok." +else + $chicken cp -v $temp.doc.new doc.html + update_list="$update_list doc.html" +fi + + +if test -z "$update_list"; then + echo "$0: nothing to update." +else + test x"$chicken" != xecho && echo "$0: committing $update_list" + $chicken svn commit --force-log -m$0 $update_list +fi + +echo "$0: done `date`." +exit 0 |