summaryrefslogtreecommitdiff
path: root/Build/tools
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-08-24 21:19:46 +0000
committerKarl Berry <karl@freefriends.org>2006-08-24 21:19:46 +0000
commit9ff01d9320cfcd3a7309de56431b2fe981bd288c (patch)
treed857f7e7bd844672c8c67c351a4f7dd9dd289504 /Build/tools
parente2cc8329f876fc8d761568fa2df397189e18a936 (diff)
missed checkin
git-svn-id: svn://tug.org/texlive/trunk@2009 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/tools')
-rwxr-xr-xBuild/tools/ctan2tl60
-rwxr-xr-xBuild/tools/tlpkginfo7
2 files changed, 46 insertions, 21 deletions
diff --git a/Build/tools/ctan2tl b/Build/tools/ctan2tl
index 0c7a1bad3d6..d8442cbbab6 100755
--- a/Build/tools/ctan2tl
+++ b/Build/tools/ctan2tl
@@ -14,6 +14,8 @@
# --place, it doesn't even create any files in the repository outside of
# cdbuild/{raw,cooked}.
+unset CDPATH # avoid extraneous output
+
mydir=`cd \`dirname $0\` && pwd` # Build/tools
raw=$mydir/../cdbuild/raw
test -d $raw || mkdir $raw
@@ -47,20 +49,35 @@ fi
echo "$0: ctan dir for $1 is $ctan_dir1"
if $copy_from_ctan; then
-# annoyingly, tugboat plain and tugboat latex are stored in two
-# different places on ctan. we'll assume we're invoked with the latex
-# dir, and now arrange to also copy in the plain stuff to a `plain'
-# subdirectory, which ctan2tds.pl has a further special case to handle.
-#
-if test "$pkg" = tugboat; then
- ctan_dir2=`echo $ctan_dir1 | sed s/latex/plain/`
- destdir2=$pkg/plain
-fi
# remove whatever old stuff we might have.
rm -rf $pkg
-if test "$pkg" = genmisc; then
+# 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|psnfss|latex-tds|tools"
+
+if echo "$pkg" | egrep "^($latex_tds_pkglist)\$"; then
+ mkdir $pkg
+ ctan_root=`tlpkginfo --ctan-root`
+ #
+ # another complication: 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. Argh.
+ #
+ if test $pkg = latex-tds; then
+ zipname=source.zip
+ else
+ zipname=$pkg.zip
+ fi
+ (cd $pkg && unzip -qq $ctan_root/macros/latex/contrib/latex-tds/$zipname)
+
+elif test "$pkg" = rsc; then
+ # single bst file.
+ mkdir -p $pkg
+ cp -p $ctan_dir1 $pkg
+
+elif test "$pkg" = genmisc; then
# do not copy subdirs, symlinks, or any files but .sty and .tex
# (that is, no patch.doc or pmat.zip).
mkdir -p $pkg
@@ -69,19 +86,22 @@ if test "$pkg" = genmisc; then
'(' -name '*.sty' -o -name *.tex ')' -print` \
$pkg
-elif test "$pkg" = rsc; then
- # single bst file.
- mkdir -p $pkg
- cp -p $ctan_dir1 $pkg
-
else
# normal case (/. to deref symlinks, e.g., arabtex)
cp -pr $ctan_dir1/. $pkg
-
- # second ctan directory (e.g., tugboat).
- if test -n "$ctan_dir2"; then
- cp -r $ctan_dir2 $destdir2
- fi
+fi
+
+# Another special case: annoyingly, tugboat plain and tugboat latex are
+# stored in two different places on ctan. we'll assume we're invoked
+# with the latex dir, and now arrange to also copy in the plain stuff to
+# a `plain' subdirectory, which ctan2tds.pl has a further special case
+# to handle. Maybe we'll come across other cases like this, in which
+# case we can generalize this.
+#
+if test "$pkg" = tugboat; then
+ ctan_dir2=`echo $ctan_dir1 | sed s/latex/plain/`
+ destdir2=$pkg/plain
+ cp -r $ctan_dir2 $destdir2
fi
fi # end of copying from CTAN.
diff --git a/Build/tools/tlpkginfo b/Build/tools/tlpkginfo
index c8b0a82409f..db7e72c69e7 100755
--- a/Build/tools/tlpkginfo
+++ b/Build/tools/tlpkginfo
@@ -16,8 +16,13 @@ sub main
if ($ARGV[0] eq "--ctan-dir") {
return &find_ctan_dir ($ARGV[1]);
+
+ } elsif ($ARGV[0] eq "--ctan-root") {
+ print "$CTAN\n";
+ return 0;
+
} else {
- die "Usage: $0 --ctan-dir PKGNAME (not @ARGV)\n";
+ die "Usage: $0 --ctan-dir PKGNAME or --ctan-root (not @ARGV)\n";
}
}