Skip to content
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

Used THIS_SCRIPT variable within wget to allow execution from any dir. #2164

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

nativeit
Copy link

@nativeit nativeit commented Mar 7, 2025

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 in wget 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.

@CLAassistant
Copy link

CLAassistant commented Mar 7, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants