Skip to content

Conversation

danielguardicore
Copy link
Contributor

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

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Have you successfully tested your changes locally?
  • Is the TravisCI build passing?

Proof that it works

None yet

@danielguardicore danielguardicore added Bug An error, flaw, misbehavior or failure in the Monkey or Monkey Island. Island Beginner friendly New to the project? This issue is good for you! labels Jan 4, 2020
@danielguardicore danielguardicore added this to the 1.8.1 milestone Jan 4, 2020
@danielguardicore danielguardicore self-assigned this Jan 4, 2020
@danielguardicore danielguardicore modified the milestones: 1.8.1, 1.8.0 Jan 5, 2020
Copy link
Contributor

@ShayNehmad ShayNehmad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

℃⁜※⁋¶

Comment on lines +4 to +7
exists() {
command -v "$1" >/dev/null 2>&1
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused here?

Copy link
Contributor Author

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

Copy link
Contributor

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'
Copy link
Contributor

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"

Copy link
Contributor Author

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.

@danielguardicore
Copy link
Contributor Author

℃⁜※⁋¶

Wat

exit 1
}

if exists wget; then
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added

@danielguardicore
Copy link
Contributor Author

@VakarisZ take a look and test please. If ok, I want to merge this then work on removing need for further downloads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Beginner friendly New to the project? This issue is good for you! Bug An error, flaw, misbehavior or failure in the Monkey or Monkey Island.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installation from .deb fails on Ubuntu machine which doesn't have curl installed
3 participants