Issues 78 - Makes install.sh more shellcheck compliant.#81
Merged
jwerle merged 9 commits intobpkg:masterfrom Apr 3, 2017
Merged
Issues 78 - Makes install.sh more shellcheck compliant.#81jwerle merged 9 commits intobpkg:masterfrom
install.sh more shellcheck compliant.#81jwerle merged 9 commits intobpkg:masterfrom
Conversation
install.sh more shellcheck compliant.install.sh more shellcheck compliant.
23dc11a to
5d08dc3
Compare
de0e0b5 to
d8cebd2
Compare
install.sh more shellcheck compliant.install.sh more shellcheck compliant.
Closed
jwerle
approved these changes
Apr 3, 2017
Member
|
@Potherca thank you for this! |
Member
|
Is this PR safe to merge in? Do you have anything else you'd like to add to it? |
Member
Author
|
I didn't feel too sure about the "gurl" curl wrapper so I cleaned that up by having two variations per function (wrapper) using Everything should be good to merge now. |
Member
|
@Potherca awesome thanks!! |
This was referenced Jan 19, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduction
I was thinking about taking a stab at #53 but decided to make the relevant file more shellcheck compliant first (as suggested in issue #78).
Suggested Changes
Shellcheck Fixes
All occurrences of the following issues have been resolved:
Other issues
Whilst resolving shellcheck issues, I ran into two problems.
curl "${auth_param}"caused trouble whenauth_paramis empty (=''). This did not happen when there were no quotes aroundauth_param, that is to say, things accidentally worked.To resolve this I added a wrapper for the three use-cases around curl with a check and two variations of calling curl (one with and one without
auth_param.-o /dev/nullwill fail with a write error (curl error 23). However, failure to write to/dev/nullis not an issue, as the HTTP status code is still viable. To resolve this I added a separate function for the "check url exists" logic and added the check there.If these two solutions do not cause any trouble, I do believe they are worth keeping as they are a good first step in de-duplicating some of the curl calls.
Work for later
The following shellcheck issues are still present as I am unsure as how to resolve them:
I would suggest fixing those issues in a separate PR to keep things moving.
I'll continue work on #53 on a separate branch and open a PR once this has been merged to
master.