From ea2a765b16deef5eb2585f794defdcbb9e954610 Mon Sep 17 00:00:00 2001 From: Matt Hinchliffe Date: Mon, 6 Apr 2020 15:16:52 +0100 Subject: [PATCH 1/2] Use either curl or wget if available in neo4j setup script The wget utility is not available by default on MacOS machines and must be installed separately. This adds a check for `wget` and `curl` as this can perform the same job and ensures the script *just works* for most users. --- scripts/neo4j-plugins | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/neo4j-plugins b/scripts/neo4j-plugins index 2f12d4dd0..091ae81cc 100755 --- a/scripts/neo4j-plugins +++ b/scripts/neo4j-plugins @@ -1,6 +1,15 @@ #!/usr/bin/env bash mkdir -p neo4j/{plugins,logs,data} -wget -O neo4j/plugins/apoc-3.5.0.1-all.jar https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.5.0.1/apoc-3.5.0.1-all.jar + +APOC_PLUGIN_URL=https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.5.0.1/apoc-3.5.0.1-all.jar +APOC_PLUGIN_FILENAME=neo4j/plugins/apoc-3.5.0.1-all.jar + +if type wget 2>/dev/null; then + wget -O $APOC_PLUGIN_FILENAME $APOC_PLUGIN_URL +elif type curl 2>/dev/null; then + curl --output $APOC_PLUGIN_FILENAME $APOC_PLUGIN_URL +fi + chmod 0644 neo4j/plugins/*.jar ls -la neo4j/plugins From 60ff68205d99ad79a723b753130a2e861bd838a4 Mon Sep 17 00:00:00 2001 From: Matt Hinchliffe Date: Mon, 6 Apr 2020 15:30:15 +0100 Subject: [PATCH 2/2] Update install troubleshooting guide to remove unnecessary wget note --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 5e5900fbd..00ac63601 100644 --- a/README.md +++ b/README.md @@ -62,8 +62,6 @@ make run-db _Troubleshooting_ -- You may need to install `wget` in order to run `./scripts/neo4j-plugins`. You can do this with `brew` by running `brew install wget` -- If `wget` fails, visit https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases, download version `3.5.0.1` and save in `./neo4j/plugins` - The `make run-db` command requires you to have an account with docker, (you should be able to do that [here](https://hub.docker.com/)) and download the the docker application (you should be able to do that [here](https://www.docker.com/get-docker))). This can be done _without_ docker if desired, by instead installing a neo4j database instance to the `neo4j` directory, the directory structure and scripts to run are the same as the docker configuration.