summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-05-03 22:25:11 +0000
committerKarl Berry <karl@freefriends.org>2006-05-03 22:25:11 +0000
commit1dc1536d63d9f4ede7fc5d3fff08eea3954abe15 (patch)
tree071b158b6f36b820013e91c313ca670139627414
parent146f21b4ffc63ab7f71a770c903eecacdcb96f80 (diff)
first cut at svn instead of p4
git-svn-id: svn://tug.org/texlive/trunk@1566 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xBuild/cdbuild/ctan2tds.pl7
-rwxr-xr-xBuild/cdbuild/place143
-rwxr-xr-xBuild/tools/ctan2tl20
-rwxr-xr-xBuild/tools/tpm-ctan-check4
4 files changed, 99 insertions, 75 deletions
diff --git a/Build/cdbuild/ctan2tds.pl b/Build/cdbuild/ctan2tds.pl
index 28a472e0ffd..4a77b31520a 100755
--- a/Build/cdbuild/ctan2tds.pl
+++ b/Build/cdbuild/ctan2tds.pl
@@ -1,7 +1,8 @@
-#!/usr/bin/perl
-# $Author: karl $ $Date: 2005/11/01 $ $Id: //depot/Build/cdbuild/ctan2tds.pl#236 $
+#!/usr/bin/env perl
+# $Id$
#
-# A script to (theoretically) TL-install any package from CTAN.
+# A script to TL-install a package from CTAN.
+# For a higher-level invocation, see ../tools/ctan2tl.
#
# Its actions, given a directory, are
# 1. copy everything to texmf-dist/source/<format>/<package>
diff --git a/Build/cdbuild/place b/Build/cdbuild/place
index 3b937ab55e3..ce088b0e451 100755
--- a/Build/cdbuild/place
+++ b/Build/cdbuild/place
@@ -1,43 +1,37 @@
#!/usr/bin/env perl
-# Sebastian Rahtz: $Date: 2004/06/06 $
-# Process a tree in the texlive "cooked" directory and put
-# in the main texmf trees
-#
-# License: PUBLIC DOMAIN
-#
+# $Id$
+# License: public domain. Originally written by Sebastian Rahtz.
+#
+# Process a tree in the Build/cdbuild/cooked directory (probably created
+# by ctan2tds.pl) and integrate into the main texmf trees.
+#
+# Basic usage: place PKG
+# to process Build/cdbuild/cooked/PKG.
+#
use English;
use File::Basename;
use File::Find;
use Cwd;
-$Date=`date +%Y/%m/%d`;
-$Who=`whoami`;
-chop($Date);
-chop($Who);
+
$newpackage=0;
-$PM="//depot/Master";
@zapped=();
+
$package=$ARGV[0];
-$startdir=getcwd();
-$Inidir = getcwd();
-chdir(dirname($0));
-chdir "../../Master";
+xchdir (dirname($0) . "/cooked");
+$mydir = getcwd();
+-d "$mydir/$package" || die "$0: No such package in $mydir: $package\n";
+
+xchdir ("../../../Master");
$M = getcwd();
-$M =~ s/\/Archive//;
-chdir("$Inidir/$package");
+xchdir ("$mydir/$package");
if (-d "texmf-dist") {$Root="texmf-dist"; }
elsif (-d "texmf-doc") {$Root="texmf-doc"; }
elsif (-d "texmf") {$Root="texmf"; }
-if (!-d "$Inidir/$package") {
- die "No package to install: $package\n"; }
-
-print "$M, $Inidir, $Root\n";
-
# get list of existing files
-chdir($M) || die ("directory $M does not exist");
if (-f "$M/texmf/lists/$package") {
open(LIST,"$M/texmf/lists/$package");
while (<LIST>) {
@@ -46,69 +40,70 @@ if (-f "$M/texmf/lists/$package") {
if (/^[A-z]/) { $Old{$_}=1; }
}
close(LIST);
- system "p4 edit $PM/texmf/lists/$package";
}
else
{
$newpackage=1;
}
-if (-f "$M/$Root/tpm/$package.tpm") {
- system "p4 edit $PM/$Root/tpm/$package.tpm";
-}
-else {
- system "p4 add $M/$Root/tpm/$package.tpm";
+
+if (! -f "$M/$Root/tpm/$package.tpm") {
+ &my_system ("svn add $M/$Root/tpm/$package.tpm");
}
-chdir("$Inidir/$package");
+xchdir("$mydir/$package");
find(\&files,".");
foreach $file (keys %Old) {
print "* $file: [" . $New{$file} . "]\n";
- if ($New{$file}) {
- system "p4 edit $PM/$file";
- }
- else {
- system "p4 delete $PM/$file";
+ if (! $New{$file}) {
+ &my_system ("svn remove $PM/$file");
}
}
+
# copy files
-$Job="tar cf - . | (cd $M ; tar xf - )";
-system($Job);
+$Job="tar cf - . | (cd $M && tar xf - )";
+&my_system ($Job);
foreach $file (keys %New) {
- if ($Old{$file}) { } else { system "p4 add $M/$file"; }
+ if (! $Old{$file}) {
+ &my_system ("svn add $M/$file");
+ }
}
-if ($newpackage)
- {
- system "p4 add $M/texmf/lists/$package";
- system "p4 add $M/$Root/tpm/$package.tpm";
- }
-else
-{
- system "p4 edit $PM/texmf/lists/$package";
- system "p4 edit $PM/$Root/tpm/$package.tpm";
+if ($newpackage) {
+ &my_system ("svn add $M/texmf/lists/$package");
+ &my_system ("svn add $M/$Root/tpm/$package.tpm");
}
-chdir("$Inidir");
-system("mv $package $package.done");
-if ($Root eq 'texmf-doc') { $Type='Documentation'; }
-else { $Type='Package'; }
+xchdir($mydir);
+&my_system("mv $package $package.done");
-$SETUP="$M/Tools/tpm-factory.pl --master=$M --tpm_dir=$M/$Root/tpm --ftp_dir=/var/tmp ";
-if (-f "$M/$Root/tpm/$package.tpm") {
- system "perl $SETUP --clean --arch=all --patterns=auto --name=$Type/$package";
+if ($Root eq 'texmf-doc') {
+ $Type='Documentation';
+} elsif ($Root eq 'texmf-dist') {
+ $Type='Package';
+} else {
+ die "cannot handle Root=$Root";
}
-else
-{
- system "perl $SETUP --new --arch=all --patterns=auto --name=$Type/$package";
- system "perl $SETUP --clean --arch=all --patterns=auto --name=$Type/$package";
+
+$SETUP = "$M/Build/tools/tpm-factory.pl --master=$M --tpm_dir=$M/$Root/tpm"
+ . " --ftp_dir=/var/tmp --arch=all --patterns=auto"
+ . " --name=$Type/$package";
+if (! -f "$M/$Root/tpm/$package.tpm") {
+ &my_system ("perl $SETUP --new");
}
+&my_system ("perl $SETUP --clean");
+
+&my_system ("xsltproc --stringparam ROOT $M"
+ . " $M/Tools/tpm2list.xsl $M/$Root/tpm/$package.tpm");
- system "xsltproc --stringparam ROOT $M $M/Tools/tpm2list.xsl $M/$Root/tpm/$package.tpm";
+exit (0);
+
+
#--------------------------------------
-sub dirs {
+sub dirs
+{
local @filenames;
if (-d) {
@filenames=&buildfilelist($File::Find::name,
@@ -116,7 +111,8 @@ sub dirs {
if (!@filenames) { rmdir $File::Find::name;}
}}
-sub buildfilelist {
+sub buildfilelist
+{
local($me,$name) = @_;
my @files;
opendir(DIR,$me) || cleanup ("cannot open directory $me");
@@ -125,11 +121,32 @@ sub buildfilelist {
return @files;
}
-sub files {
- if (-f) {
+sub files
+{
+ if (-f) {
$Shortname=$_;
$This=$File::Find::name;
$This =~ s/^\.\///;
$New{$This}=1;
}
}
+
+sub xchdir
+{
+ my ($dir) = @_;
+ chdir ($dir) || die "chdir($dir) failed: $!";
+ print "place: chdir($dir)\n";
+}
+
+sub my_system
+{
+ my ($cmd) = @_;
+
+ print "place: SYSTEM $cmd\n";
+
+ my $chicken = 1;
+ unless ($chicken) {
+ my $ret = system ($cmd);
+ print "... failed, status=$ret\n" if $ret != 0;
+ }
+}
diff --git a/Build/tools/ctan2tl b/Build/tools/ctan2tl
index 05eeaee2212..b5032e76f33 100755
--- a/Build/tools/ctan2tl
+++ b/Build/tools/ctan2tl
@@ -1,13 +1,20 @@
#!/bin/sh
-# $Id: //depot/Master/Tools/ctan2tl#23 $
+# $Id$
# Public domain. Originally written 2005, Karl Berry.
#
-# Takes a ctan directory, pushes it into TL. Just an initial attempt.
-# --no-place to avoid final place invocation (p4 operations).
+# Initial attempt at pushing a ctan directory into TL.
# See ./README for a bit more info.
-
-mydir=`dirname $0` # Master/Tools
-cd $mydir/../../Build/cdbuild/raw || exit 1
+#
+# Basic usage: ctan2tl /path/to/ctan/package
+# --place to include final `place' invocation (repository adds/removes).
+# --no-ctan if already have files in ../cdbuild/raw/PKG.
+#
+# This does not actually commit anything to the repository.
+
+mydir=`dirname $0` # Build/tools
+raw=$mydir/../cdbuild/raw
+test -d $raw || mkdir $raw
+cd $raw || exit 1
if test "x$1" = x--place; then
place=true
@@ -119,6 +126,5 @@ $place || exit 0
printf "\n\f place\n"
rm -rf $pkg.done
../place $pkg
-p4 revert -a
rm -rf ../raw/$pkg
diff --git a/Build/tools/tpm-ctan-check b/Build/tools/tpm-ctan-check
index 437c389c393..6ecee08e56f 100755
--- a/Build/tools/tpm-ctan-check
+++ b/Build/tools/tpm-ctan-check
@@ -1,5 +1,5 @@
#!/usr/local/bin/perl
-# $Author: karl $ $Date: 2005/10/30 $ $Id: //depot/Master/Tools/tpm-ctan-check#158 $
+# $Id$
# Public domain. Originally written 2005, Karl Berry.
# Check if a package in TL has any changes on CTAN. Just the beginnings.
@@ -43,7 +43,7 @@ sub main
"hyphen-norwegian", "hyphen-ukenglish", "hyphen-usorbian",
"ibygrk", "iopart-num",
"koma-script",
- "ledmac", "lfb", "lineno",
+ "labelcase", "ledmac", "lfb", "lineno",
"lshort-bulgarian", "lshort-dutch", "lshort-english",
"lshort-finnish", "lshort-french", "lshort-german",
"lshort-italian", "lshort-japanese", "lshort-korean",