summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/ctan2tds
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/bin/ctan2tds')
-rwxr-xr-xMaster/tlpkg/bin/ctan2tds46
1 files changed, 14 insertions, 32 deletions
diff --git a/Master/tlpkg/bin/ctan2tds b/Master/tlpkg/bin/ctan2tds
index 3f10db28d9a..ca930cb293b 100755
--- a/Master/tlpkg/bin/ctan2tds
+++ b/Master/tlpkg/bin/ctan2tds
@@ -1,36 +1,20 @@
#!/usr/bin/env perl
# $Id$
+# Public domain.
+# Originally written by Sebastian Rahtz. Comments to tex-live@tug.org.
#
# A script to TL-install a package from CTAN.
-# For a higher-level invocation, see ../tools/ctan2tl.
+# For a higher-level invocation, see ctan2tl.
#
-# Its actions, given a directory, are
-# 1. copy everything to texmf-dist/source/<format>/<package>
+# Its default actions, given a "raw" directory copied from CTAN (the
+# current directory on invocation), are
+# 1. copy everything to texmf-dist/doc/<format>/<package>
# 2. run any .ins files
# 3. run any .mf files through mktextfm
# 4. move .sty/.cls etc files to texmf-dist/tex/<format>/<package>
-# 5. run LaTeX on .dtx/.tex and put the .dvi files in
-# texmf-dist/doc/<format>/<package>. dtx files are run with just the
-# description if this is set up properly in the source.
-# 6. move .tex to texmf-dist/doc/<format>/<package>
+# 5. move other files to appropriate places in the hierarchy.
#
-# All the patterns for what to move or run can be overridden for each package.
-#
-# PROBLEMS
-# 1. .tex files are used for lots of different purposes, so this is flaky
-# 2. if there is no .dtx, the .sty files are *moved*, rather than copied,
-# so the source directory is not complete. is this a bug or a feature?
-# [feature --karl]
-# 3. complex packages with subdirectories are not well catered for
-#
-# ENHANCEMENTS NEEDED
-# 1. a notation for dependencies; actually surprisingly few
-# 2. cleaner way of describing the various %special... hashes, so info
-# about a given package is in one place.
-#
-# Originally written by Sebastian Rahtz. Comments to tex-live@tug.org.
-
-# License: PUBLIC DOMAIN
+# All the patterns for what to move or run can be overridden per-package.
use English;
use Getopt::Long;
@@ -38,18 +22,16 @@ use File::Basename;
use Cwd;
#
# programs used; must all be on the path
-$MV="mv";
-$CP="cp -p";
+$MV = "mv";
+$CP = "cp -p";
$| = 1;
select ((select (STDERR), $| = 1)[0]);
-# the destination destination tree
-$startdir=getcwd();
-chdir(dirname($0));
-chdir "cooked" || die "chdir(cooked) failed: $!";
-$TDS = getcwd();
-chdir $startdir || die "chdir($startdir) failed: $!";
+$startdir = getcwd(); # where we start from (raw dir)
+chdir "../tmp.cooked" || die "chdir(../tmp.cooked) failed: $!";
+$TDS = getcwd(); # locate destination dir
+chdir $startdir || die "chdir($startdir) failed: $!"; # back to raw
#
# packages to treat entirely on their own, or not at all.