Used THIS_SCRIPT variable within wget to allow execution from any dir. #2164
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.
This is a very, very small change to the
update.sh
script that fixes an issue I originally referenced with #2162 where execution of the script from another directory (using a path like./scripts/update.sh
) results in the script getting stuck in a loop when it needs an update. I looked into it, and found that was because the updated script was being saved in the shell's current directory, rather than overwriting the original script in its original location (so when the process starts over, it still has an out-of-date script, thus endless loop).Since there is a variable used in the next command (
$THIS_SCRIPT
) that defines the full path and filename of the update script, I replaced the output flag inwget
from-o update.sh
to-o "${THIS_SCRIPT}"
and it makes the update script function more narrowly defined, and safer than it is currently.I realize it's taken longer to read this than it did to make the change itself, so I'll not waste any more of your time. If you feel this was worthwhile, thanks for accepting my PR. If not, I will presume you have your reasons, no worries. Keep up the great work.