dafc38a60fa78a7a14bfaf05905e2190da48a386 hiram Wed Jan 29 12:17:10 2020 -0800 correctly avoid trying to remove something that does not exist refs #24851 diff --git src/hg/utils/automation/doSimpleRepeat.pl src/hg/utils/automation/doSimpleRepeat.pl index 743b60d..1512371 100755 --- src/hg/utils/automation/doSimpleRepeat.pl +++ src/hg/utils/automation/doSimpleRepeat.pl @@ -386,32 +386,34 @@ _EOF_ ); $bossScript->execute(); } # doLoad ######################################################################### # * step: cleanup [fileServer] sub doCleanup { my $runDir = "$buildDir"; my $whatItDoes = "It cleans up or compresses intermediate files."; my $fileServer = &HgAutomate::chooseFileServer($runDir); my $bossScript = new HgRemoteScript("$runDir/doCleanup.csh", $fileServer, $runDir, $whatItDoes); $bossScript->add(<<_EOF_ +if ( -d "TrfPart" || -l "TrfPart" ) then rm -fr TrfPart/* rm -fr TrfPart +endif if (-d /hive/data/genomes/$db/TrfPart) then rmdir /hive/data/genomes/$db/TrfPart endif _EOF_ ); $bossScript->execute(); } # doCleanup ######################################################################### # main # Prevent "Suspended (tty input)" hanging: &HgAutomate::closeStdin();