Optionally ignore extra dirs in gen-make-frag.sh.#833
Merged
devinamatthews merged 2 commits intomasterfrom Jan 20, 2025
Merged
Conversation
Details: - Implemented an option (-i LIST) to gen-make-frag.sh that allows the caller to optionally ignore additional directories when walking the source directory. (Note that previously the standard -- and only -- way to ignore directories was to add them to the ignore_list file, which is a required argument to the script.) - I implemented this feature for something but then ended up not needing it, but figured it might be helpful in the future.
leekillough
reviewed
Nov 23, 2024
| echo " Hide the makefile fragments by prepending filenames with '.'." | ||
| echo " -i LIST ignore" | ||
| echo " Augment the list of directory names contained in ign_list" | ||
| echo " with the directory names in LIST." |
Collaborator
There was a problem hiding this comment.
Like configure.sh, here-docs can improve readability and maintainability.
cat <<EOF
Enter
Text
Here
EOF
| d ) dry_run_flag="1" ;; | ||
| h ) hide_flag="1" ;; | ||
| r ) recursive_flag="1" ;; | ||
| i ) ignore_list="$OPTARG" ;; |
Member
There was a problem hiding this comment.
This should probably be ignore_list="$ignore_list $OPTARG" to allow for multiple -i options.
Member
Author
There was a problem hiding this comment.
Good idea. I've made the change.
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.
Details:
-i LIST) togen-make-frag.shthat allows the caller to optionally ignore additional directories when walking the source directory. (Note that previously the standard -- and only -- way to ignore directories was to add them to theignore_listfile, which is a required argument to the script.)