diff options
Diffstat (limited to 'Build/tools/ctan2tl')
-rwxr-xr-x | Build/tools/ctan2tl | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/Build/tools/ctan2tl b/Build/tools/ctan2tl index 6dc90f1e171..d173a24cd32 100755 --- a/Build/tools/ctan2tl +++ b/Build/tools/ctan2tl @@ -41,12 +41,20 @@ if test -z "$pkg"; then exit 1 fi -ctan_dir1=`tlpkginfo --ctan-dir $pkg` +# See comments below. +amslatex_tds_pkglist="ams|amscls|amsltx2|amsmath|amsrefs" +if echo "$pkg" | egrep "^($amslatex_tds_pkglist)\$" >/dev/null; then + ctan_pkgname=amslatex +else + ctan_pkgname=$pkg +fi + +ctan_dir1=`tlpkginfo --ctan-dir $ctan_pkgname` if test -z "$ctan_dir1"; then - echo "$0: can't find CTAN directory for $pkg." >&2 + echo "$0: can't find CTAN directory for $ctan_pkgname." >&2 exit 1 fi -echo "$0: ctan dir for $1 is $ctan_dir1" +echo "$0: ctan dir for $pkg is $ctan_dir1" if $copy_from_ctan; then @@ -55,21 +63,26 @@ rm -rf $pkg # An important special case: the latex-tds project contains tds-ready # zip files for the base latex distribution. We want to use them. -latex_tds_pkglist="amslatex|babel|cyrillic|graphics|latex|psnfss|latex-tds|tools" +corelatex_tds_pkglist="babel|cyrillic|graphics|latex|psnfss|tools" +latex_tds_pkglist="latex-tds|$amslatex_tds_pkglist|$corelatex_tds_pkglist" -if echo "$pkg" | egrep "^($latex_tds_pkglist)\$"; then +if echo "$pkg" | egrep "^($latex_tds_pkglist)\$" >/dev/null; then mkdir $pkg ctan_root=`tlpkginfo --ctan-root` # - # another complication: the latex-tds package for our purposes is the + # complications: the latex-tds package, for our purposes, is the # sources for the tools that do the process; that's in the zip file # source.zip, in the latex-tds directory. Similarly, the zip file for - # latex itself is named "base.zip". + # latex itself is named "base.zip". Finally, amslatex.zip actually + # contains several packages (= directories) -- such as ams, amscls, + # etc. AMS sets it up that way. # if test $pkg = latex-tds; then zipname=source.zip elif test $pkg = latex; then zipname=base.zip + elif echo "$pkg" | egrep "^($amslatex_tds_pkglist)\$" >/dev/null; then + zipname=amslatex.zip else zipname=$pkg.zip fi |