Skip to content

Optionally ignore extra dirs in gen-make-frag.sh.#833

Merged
devinamatthews merged 2 commits intomasterfrom
gen-make-frag-ignore
Jan 20, 2025
Merged

Optionally ignore extra dirs in gen-make-frag.sh.#833
devinamatthews merged 2 commits intomasterfrom
gen-make-frag-ignore

Conversation

@fgvanzee
Copy link
Copy Markdown
Member

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.

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.
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."
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like configure.sh, here-docs can improve readability and maintainability.

cat <<EOF
Enter
Text
Here
EOF

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. :)

Comment thread build/gen-make-frags/gen-make-frag.sh Outdated
d ) dry_run_flag="1" ;;
h ) hide_flag="1" ;;
r ) recursive_flag="1" ;;
i ) ignore_list="$OPTARG" ;;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be ignore_list="$ignore_list $OPTARG" to allow for multiple -i options.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. I've made the change.

@devinamatthews devinamatthews merged commit 38063dd into master Jan 20, 2025
@devinamatthews devinamatthews deleted the gen-make-frag-ignore branch January 20, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants