-
Notifications
You must be signed in to change notification settings - Fork 29
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
script to verify hutch name #114
Conversation
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.
Looking good. I'd just say clean up your comments and debug messages, then there's a bit of unnecessary code that can be taken out as well. Otherwise, good to go.
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.
Looking better, keep improving 👍
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.
The script looks solid to me! I'll give out my green checkmark.
One thing to consider: should we also add an entry to the table in the repository's README.md file?
Yes, @c-tsoi please add the usage for this file to the README.md (it's sorted alphabetically by script name), then I'll approve as well :) |
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.
Changing usage to same as from inside the script.
Also before we merge, could you please change the script name to verify-hutch
as I believe that has been decided as the best naming convention.
README.md
Outdated
<tr> | ||
<td>verify_hutch</td> | ||
<td> | ||
usage: Verifies that the passed argument is a known hutch, exit 0 for true or exit for false. |
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.
Copy and pasting from your usage within the script (and changing ${BASH_SOURCE[0]}
to verify_hutch
usage: Verifies that the passed argument is a known hutch, exit 0 for true or exit for false. | |
usage: verify_hutch <hutch> | |
Script that returns confirmation if the passed hutch is a known/existing hutch, success indicated by exit 0, failure by exit 1. |
…utch to verify-hutch.
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.
LGTM! 👍
Description
Wrote a helper script to verify hutches, argument passed in is a string exits with 0 if successful, 1 if not successful.
Motivation and Context
Fixes #106.
How Has This Been Tested?
I tested the script with false hutch names and edge cases including first and last entries.
Where Has This Been Documented?
Usage.