summaryrefslogtreecommitdiff
path: root/Build/tools/ctan2tl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-05-30 17:48:45 +0000
committerKarl Berry <karl@freefriends.org>2006-05-30 17:48:45 +0000
commit60b30f94ad3de107dc47f344365cfbe5915b6044 (patch)
tree93db8b30cb0caeff3750a07f93af751e8194374d /Build/tools/ctan2tl
parent2534976919d6181d8269b184da08b1ae425b9dd3 (diff)
extract ctan-dir-finding to a common subprogram
git-svn-id: svn://tug.org/texlive/trunk@1621 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/tools/ctan2tl')
-rwxr-xr-xBuild/tools/ctan2tl53
1 files changed, 14 insertions, 39 deletions
diff --git a/Build/tools/ctan2tl b/Build/tools/ctan2tl
index 5545a7e8099..6047a4b7342 100755
--- a/Build/tools/ctan2tl
+++ b/Build/tools/ctan2tl
@@ -5,14 +5,16 @@
# Initial attempt at pushing a ctan directory into TL.
# See ./README for a bit more info.
#
-# Basic usage: ctan2tl /path/to/ctan/package
+# Basic usage: ctan2tl TLPKGNAME
# --place to include final `place' invocation (repository adds/removes).
# --no-ctan if already have files in ../cdbuild/raw/PKG.
# Unlikely to work without GNU utilities.
#
-# This does not actually commit anything to the repository.
+# This does not actually commit anything to the repository. Without
+# --place, it doesn't even create any files in the repository outside of
+# cdbuild/{raw,cooked}.
-mydir=`dirname $0` # Build/tools
+mydir=`cd \`dirname $0\` && pwd` # Build/tools
raw=$mydir/../cdbuild/raw
test -d $raw || mkdir $raw
cd $raw || exit 1
@@ -31,47 +33,20 @@ else
copy_from_ctan=true
fi
-if test ! -d $1; then
- echo "$0: $1 not a (CTAN) directory." >&2
+pkg=$1
+if test -z "$pkg"; then
+ echo "$0: no TL package name specified." >&2
exit 1
fi
-# xx this should be a separate script, also used by tpm-ctan-check.
-ctan_dir1=$1
-pkg=`basename $1`
+ctan_dir1=`tlpkginfo --ctan-dir $pkg`
+if test -z "$ctan_dir1"; then
+ echo "$0: can't find CTAN directory for $pkg." >&2
+ exit 1
+fi
+echo "$0: ctan dir for $1 is $ctan_dir1"
if $copy_from_ctan; then
-case "$pkg" in
- biblio) pkg=beebe;;
- fourier-GUT) pkg=fourier;;
- generic) pkg=genmisc;; # $ctan/macros/generic
- ha-prosper) pkg=HA-prosper;;
- misc) pkg=ltxmisc;; # until we do real misc package.
- tex-references) pkg=tex-refs;;
- velthuis) pkg=devanagr;;
- voss) pkg=voss-de;;
-esac
-
-# lshort is arranged by language.
-pkgdir=`dirname $ctan_dir1`
-up=`basename $pkgdir`
-test "$up" = lshort && pkg=lshort-$pkg
-
-# esint is split into two.
-test "$pkg" = esint && test "$up" = ps-type1 && pkg=esint-type1
-
-# vntex is in an unpacked subdir.
-test "$pkg" = unpacked && test "$up" = vntex && pkg=vntex
-
-# similarly for powerdot.
-test "$pkg" = distrib && test "$up" = powerdot && pkg=powerdot
-
-# powerdot-doc-vn is a couple subdirs down.
-test "$pkg" = doc-vn && test "$up" = contrib && pkg=powerdot-doc-vn
-
-# amslatex/vietnamese.
-test "$pkg" = vietnamese && test "$up" = amslatex && pkg=amsldoc-vn
-
# 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'