diff options
Diffstat (limited to 'Master/tlpkg/libexec/ctan2tds')
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds index b149b7b0a6c..6059778d4ab 100755 --- a/Master/tlpkg/libexec/ctan2tds +++ b/Master/tlpkg/libexec/ctan2tds @@ -1657,6 +1657,7 @@ chomp (my $ctan_root = `tlpkginfo --ctan-root`); 'frenchle' => '&POST_rmsymlink', 'ghsystem' => '&POSTghsystem', 'glossaries' => '&POST_do_man', + 'gentium-tug' => '&POSTgentium_tug', 'gost' => '&POSTgost', 'grotesq' => '&POSTgrotesq', 'grverb' => '&POSTgrverb', @@ -3937,11 +3938,17 @@ sub mv_with_mkdir { } # mv a single thing to another name, ensuring the parent of the -# destination exists. But if the destination itself exists, that's an error. +# destination exists. If the destination itself exists and is an empty +# directory, rmdir it. Otherwise it's an error. sub rename_with_mkdir { my ($from,$to) = @_; die "rename_with_mkdir needs exactly two args (got @_)" if @_ != 2; - die "rename_with_mkdir destination exists: $to" if -e $to; + if (-e $to) { + rmdir ($to); # ignore errors. + die ("rename_with_mkdir destination exists: $to\n" + . `ls $to`) + if -e $to; + } (my $parent = $to) =~ s,/[^/]*$,,; &xmkdir ($parent); &SYSTEM ("$MV $from $to"); @@ -6381,7 +6388,7 @@ sub POSTcfr_lm { &rename_with_mkdir ("enc", "$DEST/fonts/enc/dvips/$package"); &rename_with_mkdir ("map", "$DEST/fonts/map/dvips/$package"); &SYSTEM("$MV source/* $DEST/source/fonts/$package"); - # somehome th source/fonts package is already created??? + # the source/fonts package is already created??? #&rename_with_mkdir ("source", "$DEST/source/fonts/$package"); &rename_with_mkdir ("tex", "$DEST/tex/latex/$package"); &SYSTEM("$MV doc/* ."); @@ -6703,6 +6710,22 @@ sub POSTfpl { &SYSTEM ("cd $DEST/source/fonts/fpl/&& $MV Makefile.source Makefile"); } +sub POSTgentium_tug { + print "POST$package - just move directories around\n"; + &rename_with_mkdir ("afm", "$DEST/fonts/afm/public/$package"); + &rename_with_mkdir ("enc", "$DEST/fonts/enc/dvips/$package"); + &rename_with_mkdir ("latex", "$DEST/tex/latex/$package"); + &rename_with_mkdir ("map/dvips", "$DEST/fonts/map/dvips/$package"); + &rename_with_mkdir ("map/pdftex", "$DEST/fonts/map/pdftex/$package"); + &rename_with_mkdir ("source", "$DEST/source/fonts/$package"); + &rename_with_mkdir ("tfm", "$DEST/fonts/tfm/public/$package"); + &rename_with_mkdir ("truetype", "$DEST/fonts/truetype/public/$package"); + &rename_with_mkdir ("type1", "$DEST/fonts/type1/public/$package"); + &SYSTEM("rm README"); # symlink, should be removed already, but to be sure + &SYSTEM("$MV doc/* ."); + &SYSTEM("rmdir doc"); +} + sub POSTghsystem { print "POST$package - move subdirectories\n"; my $dstdir = "$DEST/tex/latex/$package"; |