diff options
Diffstat (limited to 'Master/tlpkg/bin/tl-update-auto')
-rwxr-xr-x | Master/tlpkg/bin/tl-update-auto | 46 |
1 files changed, 35 insertions, 11 deletions
diff --git a/Master/tlpkg/bin/tl-update-auto b/Master/tlpkg/bin/tl-update-auto index 68eb87a50f7..a48be70c32d 100755 --- a/Master/tlpkg/bin/tl-update-auto +++ b/Master/tlpkg/bin/tl-update-auto @@ -7,30 +7,33 @@ PATH=/usr/local/gnu/bin:/usr/local/bin:$PATH; export PATH umask 0 +# maybe someday we'll make real options. chicken=echo chicken= # verbose=echo verbose=false # +config_scripts_only=false + +TMPDIR=/tmp/tlua; export TMPDIR +test -d $TMPDIR || mkdir $TMPDIR +test -d $TMPDIR || { echo "$0: no directory $TMPDIR, goodbye." >&2; exit 1; } + cp="cp -fv" mv="mv -fv" diff="diff -U 2" -# maybe someday we'll make real options. -config_scripts_only=false - mydir=`cd \`dirname $0\` && /bin/pwd` Master=`cd $mydir/../.. && /bin/pwd` cd $Master || exit 1 -temp=/tmp/ua$$ +temp=$TMPDIR/ua$$ trap "rm -f $temp*" 0 1 2 15 update_list= add_list= - # autogenerate README.EN from readme.html. # if $config_scripts_only; then :; else @@ -166,10 +169,10 @@ if $config_scripts_only; then :; else # (we need to ignore the timestamps in the generation lines.) same_except_for_th () { - rm -f /tmp/seft1 /tmp/seft2 - sed '/^\.TH/d' <"$1" >/tmp/seft1 - sed '/^\.TH/d' <"$2" >/tmp/seft2 - cmp -s /tmp/seft1 /tmp/seft2 + rm -f $TMPDIR/seft1 $TMPDIR/seft2 + sed '/^\.TH/d' <"$1" >$TMPDIR/seft1 + sed '/^\.TH/d' <"$2" >$TMPDIR/seft2 + cmp -s $TMPDIR/seft1 $TMPDIR/seft2 } mandir=texmf/doc/man @@ -192,7 +195,7 @@ for script in texmf/scripts/texlive/tlmgr.pl install-tl; do # Update the version on the web site; since these aren't checked in, we # can do it unconditionally. # - pod2html="$chicken pod2html --cachedir=/tmp" + pod2html="$chicken pod2html --cachedir=$TMPDIR" $pod2html $script >$webdir/$basescript.html fi done @@ -224,7 +227,7 @@ fi # !config_scripts_only # texcatalogue.keywords # if $config_scripts_only; then :; else -cat_dump=/tmp/tc.xml +cat_dump=$TMPDIR/tc.xml rm -f $cat_dump.new wget --quiet ftp://tug.ctan.org/ftpmaint/az/texcatalogue.xml -O $cat_dump.new \ && test -s $cat_dump.new && mv $cat_dump.new $cat_dump @@ -246,6 +249,27 @@ fi fi # !config_scripts_only +# ctan mirror list from ctan. +if $config_scripts_only; then :; else +ctan_mirrors=$TMPDIR/mirrors # incoming data from CTAN +ctan_mirmon=$TMPDIR/mirmon.state +mirrors4tl=tlpkg/installer/ctan_mirrors.pl # massaged for TL + +if wget --quiet http://ctan.org/mirrors -O $ctan_mirrors \ + && rsync rsync://comedy.dante.de/MirMon/mirmon.state $ctan_mirmon; then + $mydir/tl-update-ctan-mirrors $ctan_mirrors $ctan_mirmon >$mirrors_4tl.new + if $diff $mirrors4tl.new $mirrors4tl; then + $verbose " $mirrors4tl ok." + else + $chicken $cp $mirrors4tl.new $mirrors4tl + update_list="$update_list $mirrors4tl" + fi +else + echo "$0: ctan mirror data not retrievable, skipping." >&2 +fi +fi # !config_scripts_only + + # svn commits. status=0 if test -z "$update_list"; then |