diff options
author | Karl Berry <karl@freefriends.org> | 2006-02-13 00:49:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-02-13 00:49:47 +0000 |
commit | 045f872c421bb96d9e680ccd7f79c823cef10521 (patch) | |
tree | 20483574ec8846ce1adb25e905f4a0b4e2505a41 /Build/tools/update-auto | |
parent | a1e47d103e66e2a947105dd7378e8df3918c3f62 (diff) |
move Master/Tools to Build/tools
git-svn-id: svn://tug.org/texlive/trunk@1514 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/tools/update-auto')
-rwxr-xr-x | Build/tools/update-auto | 217 |
1 files changed, 217 insertions, 0 deletions
diff --git a/Build/tools/update-auto b/Build/tools/update-auto new file mode 100755 index 00000000000..0edba3f363e --- /dev/null +++ b/Build/tools/update-auto @@ -0,0 +1,217 @@ +#!/bin/sh +# $Id$ +# Public domain. Originally written 2003, Karl Berry. +# +# Deal with files that are automatically updated in one way or another. +# +# We should rewrite this to use rdist or make or something, but we'll +# stick with this kludgy approach as long as we have perforce. + +PATH=/usr/local/bin:$PATH; export PATH +umask 0 + +# most stuff in Master. +Master=`cd \`dirname $0\`/.. && /bin/pwd` +cd $Master || exit 1 + +temp=/tmp/ua$$ +trap "rm -f $temp*" 0 1 2 15 + +# autogenerate README.EN from readme.html. +# +./Tools/htmltext <readme.en.html >$temp +if diff $temp README.EN; then + echo " README.EN ok." +else + p4 edit README.EN || exit 1 + mv $temp README.EN + # + printf "Change: new +Description: +\t$0 (from readme.en.html) +Files: +\t//depot/Master/README.EN +" | p4 submit -i 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; then + echo " $faqslavef ok." + else + p4 edit $faqslavef || exit 1 + cp $f $faqslavef + printf "Change: new +Description: +\t$0 (from $f) +Files: +\t//depot/Master/$faqslavef +" | p4 submit -i $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; then + echo " $modesslave ok." +else + p4 edit $modesslave || exit 1 + cp $modesmaster $modesslave + # + printf "Change: new +Description: +\t$0 (from `hostname`:$modesmaster) +Files: +\t//depot/Master/$modesslave +" | p4 submit -i $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; then + echo " $txislave ok." +else + p4 edit $txislave || exit 1 + cp $tximaster $txislave + # + printf "Change: new +Description: +\t$0 (from `hostname`:$tximaster) +Files: +\t//depot/Master/$txislave +" | p4 submit -i $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 $fontnameslavef $fontnamemaster/$basef; then + echo " $fontnameslavef ok." + else + p4 edit $fontnameslavef || exit 1 + cp $fontnamemaster/$basef $fontnameslavef + printf "Change: new +Description: +\t$0 (from $basef) +Files: +\t//depot/Master/$fontnameslavef +" | p4 submit -i $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 $fontnamemapslavef $fontnamemaster/$basef; then + echo " $fontnamemapslavef ok." + else + p4 edit $fontnamemapslavef || exit 1 + cp $fontnamemaster/$basef $fontnamemapslavef + printf "Change: new +Description: +\t$0 (from $basef) +Files: +\t//depot/Master/$fontnamemapslavef +" | p4 submit -i $fontnamemapslavef + fi +done + + +fontnameencslave=texmf-dist/fonts/enc/dvips/base +# +files=`cd $fontnamemaster && ls *.enc` +for basef in $files; do + fontnameencslavef=$fontnameencslave/$basef + if diff $fontnameencslavef $fontnamemaster/$basef; then + echo " $fontnameencslavef ok." + else + p4 edit $fontnameencslavef || exit 1 + cp $fontnamemaster/$basef $fontnameencslavef + printf "Change: new +Description: +\t$0 (from $basef) +Files: +\t//depot/Master/$fontnameencslavef +" | p4 submit -i $fontnameencslavef + fi +done + + +# doc.html. +doctemp=docnew.html +./Tools/mkdocindex | tee $doctemp | grep -v '<small>Generated' >$doctemp.new +grep -v '<small>Generated' doc.html >$doctemp.cur +if diff $doctemp.cur $doctemp.new; then + echo " doc.html ok." +else + p4 edit doc.html || exit 1 + mv $doctemp doc.html + # + printf "Change: new +Description: +\t$0 (from mkdocindex) +Files: +\t//depot/Master/doc.html +" | p4 submit -i doc.html +fi +rm $doctemp* + + +# config.{guess,sub} from GNU. +# +updated= +for gnuconf in config.guess config.sub; do + wget -O $temp "http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/$gnuconf?rev=HEAD&content-type=text/plain" >$temp.2 2>&1 + if test ! -s $temp; then + echo "$0: skipping, could not retrieve $gnuconf:" >&2 + cat $temp.2 + continue + fi + if cmp -s $temp $gnuconf; then + echo " $gnuconf ok." + else + # autoupdate all copies in source. + (cd .. + alldev="Master/$gnuconf `find Build/source Build/source.development -name $gnuconf`" + for f in $alldev; do + echo " updating $f." + p4 edit $f || continue + cp -pf $temp $f + done + p4 change -o \ + | sed "s!<enter description here>!$gnuconf update by $0!" \ + | p4 submit -i + ) + fi +done |