summaryrefslogtreecommitdiff
path: root/Master/tlpkg
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2007-12-24 06:49:14 +0000
committerNorbert Preining <preining@logic.at>2007-12-24 06:49:14 +0000
commitbf9aeb7b207c5077989e6fcae87a33bc4648437a (patch)
tree2429b1aaf277e7bcc9957cacf3f8ce1641a323a4 /Master/tlpkg
parente524d6a5e7610b135a2f3178851ccd7c98048f86 (diff)
create/add README.TEXLIVE with the lines of removed files from $moreclean
git-svn-id: svn://tug.org/texlive/trunk@5869 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg')
-rwxr-xr-xMaster/tlpkg/bin/ctan2tds41
1 files changed, 39 insertions, 2 deletions
diff --git a/Master/tlpkg/bin/ctan2tds b/Master/tlpkg/bin/ctan2tds
index 4ad956f3ba0..786e028f816 100755
--- a/Master/tlpkg/bin/ctan2tds
+++ b/Master/tlpkg/bin/ctan2tds
@@ -1447,7 +1447,7 @@ sub donormal {
&SYSTEM("rmdir $DEST/*/$whichformat/$package 2> /dev/null");
killfiles($cleanpatt);
- killfiles($moreclean{$package}) if $moreclean{$package};
+ killmorefiles($moreclean{$package}) if $moreclean{$package};
my $postnormal = $specialpostnormal{$package};
eval ($postnormal) if $postnormal;
@@ -1643,6 +1643,43 @@ sub runjob {
}
}
+# remove additional files matching something in $moreclean
+# create a README.TEXLIVE which lists the removed files
+#
+sub killmorefiles {
+ my ($killpatt) = @_;
+ my $fh;
+ my @delfiles;
+ for (grep (/$killpatt/, @filenames)) {
+ print "\t Remove $_\n";
+ unlink $_;
+ push @delfiles, $_;
+ }
+
+ for (grep (/\.ps$/, @filenames)) {
+ (my $pdf = $_) =~ s/ps$/pdf/;
+ next unless grep (/$pdf/, @filenames);
+ print "\t Remove ps $_ (since have $pdf)\n";
+ unlink $_;
+ push @delfiles, $_;
+ }
+ # create/add some lines to README.TEXLIVE
+ if (@delfiles) {
+ open RTL, ">>README.TEXLIVE" or warn "Cannot create README.TEXLIVE\n";
+ print RTL <<EOF;
+
+The following files have been removed from the current package
+due to licensing conditions or missing source code. Please find
+these files on the CTAN!
+EOF
+ foreach my $f (@delfiles) {
+ print RTL "\t$f\n";
+ }
+ print RTL "\n";
+ close RTL;
+ }
+}
+
# remove all files matching something in $killpatt.
# also remove .ps files for which we have a .pdf.
#
@@ -3010,7 +3047,7 @@ sub MAKEpst {
&dotex;
&dotype1;
killfiles($cleanpatt);
- killfiles($moreclean{$package}) if $moreclean{$package};
+ killmorefiles($moreclean{$package}) if $moreclean{$package};
&SYSTEM("mkdir -p $DEST/tex/latex/$package");
&SYSTEM("mv $DEST/tex/generic/$package/*sty $DEST/tex/latex/$package");
&SYSTEM("mv $DEST/doc/generic/$package/*sty $DEST/tex/latex/$package");