texlive[62301] Master: empty dirs

commits+karl at tug.org commits+karl at tug.org
Mon Feb 28 23:55:57 CET 2022


Revision: 62301
          http://tug.org/svn/texlive?view=revision&revision=62301
Author:   karl
Date:     2022-02-28 23:55:57 +0100 (Mon, 28 Feb 2022)
Log Message:
-----------
empty dirs

Modified Paths:
--------------
    trunk/Master/tlpkg/libexec/ctan2tds

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/stex/example/
    trunk/Master/texmf-dist/source/latex/stex/lib/

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2022-02-28 22:51:33 UTC (rev 62300)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2022-02-28 22:55:57 UTC (rev 62301)
@@ -33,6 +33,7 @@
 $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 @@
   &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 @@
   &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 @@
   &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 @@
   print "POST$package - doc files up a level\n";
   &xsystem ("$MV Makefile Makefile.top");
   &xsystem ("$MV */* .");
+  &SYSTEM ($RMDIR_EMPTY);
 }
 
 sub POSTtex_ps {



More information about the tex-live-commits mailing list.