-
Notifications
You must be signed in to change notification settings - Fork 38
Correct shell scripts issues, format shell scripts #486
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
Conversation
|
Exploring the options for shellcheck. I had passed -o all initially which triggered it to also change all information/warning cases. I'm using this currently: |
MikeFultonDev
left a comment
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.
changes seem reasonable.
maybe this would be a good thing to put a test or two into metaport first to validate nothing breaks?
bin/zopen-help2man
Outdated
| if $("${tool}" --help >/dev/null 2>&1); then | ||
| # Tool has implemented --help | ||
| if $( "${tool}" --version >/dev/null 2>&1 ) ; then | ||
| if $("${tool}" --version >/dev/null 2>&1); then |
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 kinda like a space here - but if others don't, i'm ok to change... e.g. i prefer $( <cmd> ) rather than $(<cmd>)
This reverts commit 0dc2d71.
MikeFultonDev
left a comment
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
MikeFultonDev
left a comment
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.
Does -z test for both unset and equal to ‘’ like the old code ?
Yep: |
MikeFultonDev
left a comment
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
MikeFultonDev
left a comment
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
Also introduces the script
tools/format_and_check_scripts.shwhich depends on shfmt (go tool) and shellcheck (only available on non-z/OS since its written in haskell)Related to #482