-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally ignore extra dirs in gen-make-frag.sh
.
#833
base: master
Are you sure you want to change the base?
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.
@@ -86,6 +86,9 @@ print_usage() | |||
echo " root_dir." | |||
echo " -h hide" | |||
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." |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. :)
case $opt in | ||
d ) dry_run_flag="1" ;; | ||
h ) hide_flag="1" ;; | ||
r ) recursive_flag="1" ;; | ||
i ) ignore_list="$OPTARG" ;; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Details:
-i LIST
) togen-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 theignore_list
file, which is a required argument to the script.)