Simplify the openfoam_remove_empty_dirs.sh script#879
Open
MakisH wants to merge 6 commits into
Open
Conversation
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current script is a bit verbose and has some duplication. It also does not handle the case of collated output, as discussed in #834 (comment)
This PR rewrites the script in a more general way. It defines a list of directories to check (
.andprocessor*) and a list of common result files (so this list can also easily be extended in one place), and then:It also improves logging, to make more transparent what is happening. I am not sure if having a list of what was deleted is useful: I already removed this in the past, as the logs were getting too long.
At some point I switched this from standard
shtobash, as ourrun.shscripts. Not sure it there is any reason to keep it withshanymore. At least macOS users have not complained so far.@mike-tree-corvid what do you think? Does this cover your use case?
Checklist
changelog-entries/<PRnumber>.md.