diff options
Diffstat (limited to 'Master/tlpkg/libexec/ctan2tds')
-rwxr-xr-x | Master/tlpkg/libexec/ctan2tds | 8 |
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 { |