summaryrefslogtreecommitdiff
path: root/Master/tlpkg/libexec
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-02-28 22:55:57 +0000
committerKarl Berry <karl@freefriends.org>2022-02-28 22:55:57 +0000
commitad68c90e9611a3ceb879e44780c64ca4dd280d51 (patch)
treef268eb0c5db3db6559bf704f07eda453165d78c0 /Master/tlpkg/libexec
parent973afb006d5d16c510714eb9330d5122e1d71bca (diff)
empty dirs
git-svn-id: svn://tug.org/texlive/trunk@62301 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/libexec')
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds8
1 files changed, 5 insertions, 3 deletions
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 13a2e2210a3..1b0ec400ea9 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -33,6 +33,7 @@ $CP = "cp -pv";
$RM = "rm -vf"; # -v to get feedback via GNU rm on removals
$MAKEINFO = "makeinfo";
$INSTALL = "install -D -m 664";
+$RMDIR_EMPTY = "find -type d -empty -delete -print"; # GNU find for simplicity
$| = 1;
select ((select (STDERR), $| = 1)[0]);
@@ -4807,7 +4808,7 @@ sub flatten_dirtree {
&SYSTEM ("yes n | find . -mindepth 2 -not -type d -exec mv -i '\{\}' . \\;");
# remove newly empty directories.
- &SYSTEM ("find -depth -type d -print | xargs rmdir 2>/dev/null");
+ &SYSTEM ($RMDIR_EMPTY);
}
sub MAKEunzipandflatten {
@@ -5240,7 +5241,7 @@ sub MAKEmv_doctex {
&SYSTEM ("$MV doc/* .");
#
# remove newly empty directories.
- &SYSTEM ("find -depth -type d -print | xargs rmdir 2>/dev/null");
+ &SYSTEM ($RMDIR_EMPTY);
}
sub MAKEtamethebeast {
@@ -5529,7 +5530,7 @@ sub MAKEtkz {
&SYSTEM ("$MV doc/latex/* doc/* latex/* .");
#
# remove newly empty directories.
- &SYSTEM ("find -depth -type d -print | xargs rmdir 2>/dev/null");
+ &SYSTEM ($RMDIR_EMPTY);
}
# wadalab provides nearly TDS-ready .tar.gz with additional stuff
@@ -7187,6 +7188,7 @@ sub POSTstex {
print "POST$package - doc files up a level\n";
&xsystem ("$MV Makefile Makefile.top");
&xsystem ("$MV */* .");
+ &SYSTEM ($RMDIR_EMPTY);
}
sub POSTtex_ps {