summaryrefslogtreecommitdiff
path: root/Master/tlpkg/libexec/place
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/libexec/place')
-rwxr-xr-xMaster/tlpkg/libexec/place10
1 files changed, 7 insertions, 3 deletions
diff --git a/Master/tlpkg/libexec/place b/Master/tlpkg/libexec/place
index 2bf8f014274..6b58a52ccee 100755
--- a/Master/tlpkg/libexec/place
+++ b/Master/tlpkg/libexec/place
@@ -25,7 +25,7 @@ use Getopt::Long;
my $chicken = 0;
my $opt_contrib;
-my $opt_mode = "svn";
+my $opt_mode = "svn";
exit 2 unless Getopt::Long::GetOptions (
"n" => \$chicken,
"contrib=s" => \$opt_contrib,
@@ -219,10 +219,14 @@ $dirs{"$M/tlpkg/tlpsrc/$package.tlpsrc"}++;
# the directories will not be empty.
if (! $chicken) {
for my $empty_dir (&empty_dirs (keys %dirs_with_removals)) {
+ # every once in a while a directory consists only of newly-empty
+ # dirs. This will catch some of those; not worth trying to do full
+ # recursive search to get everything, cron.tl will report on leftovers.
+ chomp (my $empty_dir_parent = `cd $empty_dir/.. && pwd`);
if ($opt_mode eq "svn") {
- &xsystem ("cd $M && svn remove $empty_dir # empty dir");
+ &xsystem ("cd $M && svn remove $empty_dir $empty_dir_parent # emptydir");
} else {
- &xsystem ("cd $M && rmdir $empty_dir")
+ &xsystem ("cd $M && rmdir $empty_dir $empty_dir_parent")
}
# already in %dirs, so don't need to add.
}