diff options
author | Karl Berry <karl@freefriends.org> | 2019-08-10 22:33:12 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-08-10 22:33:12 +0000 |
commit | e1532c8b1806d36e36549bc1fa6c6614d2a8424f (patch) | |
tree | 817a86f4ea95d2863408e258fbe0754e7a029421 /Master/tlpkg | |
parent | 65095863d32b4d7913f92aa73919ae9f3b95604d (diff) |
doc,sync,ctan-to-tl scripts
git-svn-id: svn://tug.org/texlive/trunk@51858 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rwxr-xr-x | Master/tlpkg/bin/c2l | 131 | ||||
-rwxr-xr-x | Master/tlpkg/bin/c2l3 | 39 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tl-update-asy | 15 |
3 files changed, 177 insertions, 8 deletions
diff --git a/Master/tlpkg/bin/c2l b/Master/tlpkg/bin/c2l new file mode 100755 index 00000000000..d919c56aa99 --- /dev/null +++ b/Master/tlpkg/bin/c2l @@ -0,0 +1,131 @@ +#!/usr/bin/env perl +# $Id$ +# Originally written by Karl Berry. Public domain. +# +# Convenience front-end script to run ctan2tl. It rearranges the output +# so error messages come first, then the list of changed files. Also +# accepts platform abbreviations to run tl-update-bindir, etc. Don't +# take it too seriously; it surely need generalizing for use by anyone +# else. Uses various personal environment variables, etc. + +$| = 1; +exit (&main ()); + +sub main { + # platform abbrev + my $arg = $ARGV[0]; + if ($arg eq "asy") { + exec ("tl-update-asy --build"); + } elsif ($arg eq "aarch") { + $arg = "aarch64-linux"; + } elsif ($arg eq "alpha") { + $arg = "alpha-linux"; + } elsif ($arg eq "armel") { + $arg = "armel-linux"; + } elsif ($arg eq "armhf") { + $arg = "armhf-linux"; + } elsif ($arg eq "cygwin") { + $arg = "i386-cygwin"; + } elsif ($arg eq "dar32") { + $arg = "i386-darwin"; + } elsif ($arg eq "darwin" || $arg eq "dar" + || $arg eq "mac" || $arg eq "mactex") { + $arg = "x86_64-darwin"; + } elsif ($arg eq "darleg") { + $arg = "x86_64-darwinlegacy"; + } elsif ($arg eq "irix") { + $arg = "mips-irix"; + } elsif ($arg eq "kfreebsd") { + exec ("tl-update-bindir i386-kfreebsd && tl-update-bindir amd64-kfreebsd"); + } elsif ($arg eq "linux32" || $arg eq "lin32") { + $arg = "i386-linux"; + } elsif ($arg eq "mipsel") { + $arg = "mipsel-linux"; + } elsif ($arg eq "netbsd") { + exec ("tl-update-bindir i386-netbsd && tl-update-bindir amd64-netbsd"); + } elsif ($arg eq "powdar") { + $arg = "powerpc-darwin"; + } elsif ($arg eq "powlin") { + $arg = "powerpc-linux"; + } elsif ($arg eq "sol") { + exec ("tl-update-bindir i386-solaris && tl-update-bindir x86_64-solaris"); + } elsif ($arg eq "sparc") { + $arg = "sparc-solaris"; + } elsif ($arg eq "linux64" || $arg eq "lin64") { + $arg = "x86_64-linux"; + } elsif ($arg eq "musl") { + $arg = "x86_64-linuxmusl"; + + } elsif ($arg eq "norbert" || $arg eq "nor") { + for my $p (qw(i386-linux x86_64-linux x86_64-linuxmusl)) { + system ("$0 $p") && die "norbert/$p failed"; + } + print "$0: norbert updates done.\n"; + exit 0; + + } elsif ($arg eq "cg") { # mojca + for my $p (qw(i386-freebsd amd64-freebsd + x86_64-darwinlegacy + i386-solaris x86_64-solaris)) { + system ("$0 $p") && die "cg/$p failed"; + } + print "$0: cg (contextgarden) updates done.\n"; + exit 0; + + } elsif ($arg eq "all") { + for my $p (qw(aarch dar cg norbert armhf)) { + system ("$0 $p") && die "all/$p failed"; + } + print "$0: all updates done.\n"; + exit 0; + } + + if (-d "$ENV{xb}/$arg") { + print ("tl-update-bindir $arg\n"); + exec ("tl-update-bindir", $arg); + } + + $ARGV[0] = "-p" if $ARGV[0] eq "p"; + + print "$0: running ctan2tl @ARGV\n"; + # assume bash until we don't have to. + my @lines = `set -o pipefail; ctan2tl @ARGV </dev/null 2>&1 | tee /tmp/cl.out`; + my $status = $?; + + -d "$ENV{B}/tmp.cooked" + && system ("cp /tmp/cl.out $ENV{B}/tmp.cooked/$ARGV[$#ARGV].out"); + + # *** and other notable messages. + my @msgs = grep { /^\*\*\*.* \S/ + && ! /\* Generating / + } @lines; + push (@msgs, grep { /at \/.* line / } @lines); # perl errors + push (@msgs, grep { /^svn: E/ } @lines); # svn errors + push (@msgs, grep { /: no hit for pattern/ } @lines); # tlpsrc updates + # map file changes; should do better, check .tlpsrc for existing ... + push (@msgs, grep { /(svn .*|^ )[A-z]*\.map/ } @lines); + print map { (/^\*/ ? "" : "*** ") . $_ } @msgs; + + if ($status != 0) { + warn "*** ctan2tl exit status: $status\n"; + print STDERR @lines; + return 1; + } + + my $whole_string = join ("", @lines); + my @page = split (/\f */, $whole_string); + + my $diff_list + = `test -s /tmp/$<.tlplace.diff && sed -n -e 's/^--- //' \\ + -e 's/[ \\t].*//' \\ + -e 's,/home/texlive/karl/, ,p' \\ + /tmp/$<.tlplace.diff`; + $diff_list = ""; + + # page 0: build stuff. + # page 1: cooked hierarchy. + # page 2: new vs. present. + # page 3: place output. + print "$page[2]$diff_list\n\f$page[1]\n\f$page[0]\n\f$page[3]\n"; + return 0; +} diff --git a/Master/tlpkg/bin/c2l3 b/Master/tlpkg/bin/c2l3 new file mode 100755 index 00000000000..44388f30f2d --- /dev/null +++ b/Master/tlpkg/bin/c2l3 @@ -0,0 +1,39 @@ +#!/bin/sh +# $Id$ +# Originally written by Karl Berry. Public domain. +# +# Front-front-end script for c2l to update LaTeX3, +# or (with first arg "e") LaTeX2e, both of which comprise several +# packages that should be updated together. Look at the end of the output +# for the summarized results for each package, e.g., to see if any files +# ended up getting misplaced. +# +# Argument "p" run place. + +dirsfile=/tmp/`id -u`.tlplace.dirs +cp /dev/null $dirsfile.tmp +cp /dev/null /tmp/first + +if test "x$1" = e; then + shift + label=l2e + pkgs="amsmath cyrillic graphics tools latex" + # latex-tds still has knuth psnfss; babel is separate +else + label=l3 + pkgs="l3kernel l3packages l3experimental l3build l3backend" +fi + +for p in $pkgs; do + echo "${label}pkg $p" >&2 # progress of a sort + printf "\f ${label}pkg $p\n" + c2l "$@" $p | tee /tmp/c2l.out + sed -n "1,/`printf \f`/p" /tmp/c2l.out >>/tmp/first + echo >>/tmp/first + cat $dirsfile >>$dirsfile.tmp +done + +sort -u $dirsfile.tmp >$dirsfile +wc $dirsfile +echo +cat /tmp/first diff --git a/Master/tlpkg/bin/tl-update-asy b/Master/tlpkg/bin/tl-update-asy index ef6c57db769..1475bb0fa87 100755 --- a/Master/tlpkg/bin/tl-update-asy +++ b/Master/tlpkg/bin/tl-update-asy @@ -3,13 +3,11 @@ # Public domain. Originally written 2008, Karl Berry. # Info about updating asymptote. # -# Do not run this script. It won't work. It is necessary to run the -# commands one at a time and think about what is being done. It's -# checked in so that when I get hit by a truck, at least the procedure I -# used will be available as a starting point. +# Do not just run this script. It won't work. It is necessary to run the +# commands one at a time and think about what is being done. # -# The script uses various paths and convenience variables that I define -# for myself; feel free to peruse tug.org:~karl/.bash_login, etc. +# Also, the script uses various paths and convenience variables that I +# define for myself; feel free to peruse tug.org:~karl/.bash_login, etc. # --karl test "x$1" = x--build || exit 1 @@ -25,12 +23,13 @@ if false && $update_sources_from_ctan; then cd asymptote ver=`awk -F\" '{print $2}' revision.cc` # the newly-released version + echo $ver # show list of new files to add: svn status | sed -n 's/^\?//p' | fgrep -v binaries svn add `!!` - # show list of files to remove: + # show list of files to remove (keep free) diff -qr . /home/ftp/tex-archive/graphics/asymptote/ \ | egrep -v ' differ' | egrep -v '\.svn' svn rm ... @@ -70,7 +69,7 @@ elif test "x$1" = x--build; then ./configure --prefix=/tmp/ainst \ --with-latex=/tmp/ainst/latex --with-context=/tmp/ainst/context \ --disable-fftw --disable-gl --disable-gsl \ - --enable-texlive-build CFLAGS=-g CXXFLAGS=-ansi + --enable-texlive-build CFLAGS=-g CXXFLAGS=-std=c++11 make make check make install-prebuilt |