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
Refactor Shell Scripts based on ShellCheck's suggestion #828
Refactor Shell Scripts based on ShellCheck's suggestion #828
Conversation
Thanks but I'm not going to merge this as-is. The changes seem mostly unnecessary, and some of them are in obsolete files that I should have deleted months ago. |
I can revert the changes on files need to be deleted. I don't think they are all that unnecessary, for example, one of their header used |
Merging the changes to the obsolete files makes no difference since the files are obsolete anyway. Merging the unnecessary changes probably(?) won't hurt. I agree that @PeterDaveHello's PRs such as this one tend to be low-value, but ¯\_(ツ)_/¯. Seems best to either merge or close to keep the PR queue moving. |
1b62a96
to
e53594f
Compare
Rebased on master and added a commit to delete the obsolete files. |
And another to revert changes that weren't merely unnecessary but invalid. |
|
||
# Fail on errors and undefined variables | ||
set -eu | ||
|
||
# Be somewhere predictable | ||
cd "`dirname $0`" | ||
cd "$(dirname "$0")" |
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 don't know how the double quotes behave here.
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 is quite common in shell scripts, I think it works as intended.
Assuming those double double quotes lines work as intended, lgtm. |
This will help improve the robustness of the scripts, some of the deprecated and non-safe statements need to be refactored.