Skip to content

Commit

Permalink
Merge pull request Financial-Times#323 from Financial-Times/matth/use…
Browse files Browse the repository at this point in the history
…-curl-if-available
  • Loading branch information
wheresrhys authored Jan 22, 2021
2 parents 00081d4 + 60ff682 commit 6196d70
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,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.
Expand Down
11 changes: 10 additions & 1 deletion scripts/neo4j-plugins
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6196d70

Please sign in to comment.