-
Notifications
You must be signed in to change notification settings - Fork 807
Bugfix/handle missing curl wget fixes #503 #524
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
2 - Added option to download with either curl or wget
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.
℃⁜※⁋¶
exists() { | ||
command -v "$1" >/dev/null 2>&1 | ||
} | ||
|
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.
Unused 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.
Yeah, it's prep for later code. I can remove from this PR but it'll just sneak back in later on
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.
Then leave it, but I'm giving myself a gold star for effort 🌟
if exists curl; then | ||
curl --output mongodb.tgz ${tgz_url} | ||
else | ||
echo 'Your system has neither curl nor wget, exiting' |
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.
We're not checking wget
so this error message is incorrect. We should also add "To fix this, please run\n apt install curl\n and re-run this script"
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.
Woops, typo. WIll be fixed.
Wat |
exit 1 | ||
} | ||
|
||
if exists wget; 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.
Notice that mongodb is installed after some wget calls in the deployment scripts, so it would be best to also add the same check to the deploy_linux.sh
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.
Added
@VakarisZ take a look and test please. If ok, I want to merge this then work on removing need for further downloads |
What is this?
Fixes #503 by adding option to use wget or curl as long as one is installed.
Also took the time to cleanup the script.
Checklist
Proof that it works
None yet