summaryrefslogtreecommitdiff
path: root/Build/tools
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-06-20 09:24:45 +0000
committerNorbert Preining <preining@logic.at>2007-06-20 09:24:45 +0000
commitfbb4d165a9dc6b9e04270e21b4a1bc471922c2a5 (patch)
tree869fa42fa59ea9b86152a68f2b6f113edd263078 /Build/tools
parente22089caa059b3e137088854a4e4068aa81f7972 (diff)
add first versions of ctan2tl and place for new infrastructure
delete strnage ctan2tl.new which I once adapted git-svn-id: svn://tug.org/texlive/trunk@4481 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/tools')
-rwxr-xr-xBuild/tools/ctan2tl.newinfra (renamed from Build/tools/ctan2tl.new)53
1 files changed, 19 insertions, 34 deletions
diff --git a/Build/tools/ctan2tl.new b/Build/tools/ctan2tl.newinfra
index 1a486865b34..00312137ddb 100755
--- a/Build/tools/ctan2tl.new
+++ b/Build/tools/ctan2tl.newinfra
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: ctan2tl 2084 2006-09-05 22:03:38Z karl $
+# $Id: ctan2tl 4269 2007-05-09 16:10:43Z karl $
# Public domain. Originally written 2005, Karl Berry.
#
# Initial attempt at pushing a ctan directory into TL.
@@ -46,7 +46,8 @@ if test -z "$ctan_dir1"; then
echo "$0: can't find CTAN directory for $pkg." >&2
exit 1
fi
-echo "$0: ctan dir for $pkg is $ctan_dir1"
+echo "$0: ctan dir for $pkg"
+echo "$0: is $ctan_dir1"
if $copy_from_ctan; then
@@ -82,11 +83,6 @@ if echo "$pkg" | egrep "^($latex_tds_pkglist)\$" >/dev/null; then
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).
@@ -101,19 +97,6 @@ else
cp -pr $ctan_dir1/. $pkg
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.
@@ -130,38 +113,40 @@ find $pkg \! -type d -printf "%TY%Tm%Td.%TH%TM %p\n" | sort -r +1
# compare to tpm.
Master=../../../Master
+. $Master/tlpkg/lib/TeXLiveInfra.sh
tpmfile=`ls $Master/texmf*/tpm/$pkg.tpm 2>/dev/null`
-if test -z "$tpmfile"; then
- echo "$0: no tpm file for $pkg in `cd $Master; pwd`." >&2
+if ! grep -q "^name $pkg" $Master/texlive.tlpdb ; then
+ echo "$0: not present in $Master/texlive.tlpdb" >&2
else
- printf "\nBEGIN COMPARE DATA"
printf "\n\f new vs. present $tpmfile\n"
rm -f /tmp/pkgfiles.*
# remove leading text in case of lines starting with texmf.
# Then assume all actual files do start with texmf.
- sed -n -e '/TPM:.*Files/,$s,^texmf,./texmf,p' $tpmfile \
- | grep -v '\.tpm$' \
- | sort >/tmp/pkgfiles.tpm
+ tldb_tlp_get_srcfiles $Master/texlive.tlpdb $pkg > /tmp/pkgfiles.tpm.foo
+ tldb_tlp_get_runfiles $Master/texlive.tlpdb $pkg >> /tmp/pkgfiles.tpm.foo
+ tldb_tlp_get_docfiles $Master/texlive.tlpdb $pkg >> /tmp/pkgfiles.tpm.foo
+ sort /tmp/pkgfiles.tpm.foo >/tmp/pkgfiles.tpm
#
# list of files in the new package we've just cooked.
(cd $pkg && find \! -type d -print) | grep -v '/cooked/' \
- | sort >/tmp/pkgfiles.new
+ | sed -e 's,^\./,,' | sort >/tmp/pkgfiles.new
#
comm -3 /tmp/pkgfiles.new /tmp/pkgfiles.tpm
#
- for common_file in `comm -12 /tmp/pkgfiles.new /tmp/pkgfiles.tpm`; do
- diff --ignore-all-space -u0 $Master/$common_file $pkg/$common_file
+ comm -12 /tmp/pkgfiles.new /tmp/pkgfiles.tpm >/tmp/tldiff.com
+ #
+ for common_file in `cat /tmp/tldiff.com`; do
+ diff --ignore-all-space -u -U 0 $Master/$common_file $pkg/$common_file
done >/tmp/tldiff
diff_lines=`wc -l </tmp/tldiff`
diff_lines=`expr $diff_lines / 2`
- printf "CMP: %d common files, ~%d lines different (/tmp/tldiff)\n" \
- `comm -12 /tmp/pkgfiles.new /tmp/pkgfiles.tpm | wc -l` $diff_lines
- printf "\nEND COMPARE DATA\n"
+ printf "%d common files, ~%d lines different (/tmp/tldiff)\n" \
+ `wc -l </tmp/tldiff.com` $diff_lines
fi
-printf "\n\f place $place_chicken\n"
+printf "\n\f place.newinfra $place_chicken\n"
rm -rf $pkg.done
-../place $place_chicken $pkg
+../place.newinfra $place_chicken $pkg
status=$?
rm -rf ../raw/$pkg