|
71 | 71 | # Download and extract Neo4j |
72 | 72 | if [ ! -d "${NEO4J_INSTALLATION_DIRECTORY}" ] ; then |
73 | 73 |
|
74 | | - neo4jDownloadArchiveFileName="${NEO4J_INSTALLATION_NAME}-unix.tar.gz" |
75 | | - source ${SCRIPTS_DIR}/download.sh --url "https://dist.neo4j.org/${neo4jDownloadArchiveFileName}" || exit 1 |
| 74 | + neo4jInstallationSystemPostfix="unix.tar.gz" |
| 75 | + if [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "msys" ]] || [[ "$OSTYPE" == "win32" ]]; then |
| 76 | + neo4jInstallationSystemPostfix="windows.zip" |
| 77 | + fi |
| 78 | + echo "setupNeo4j: Using ${neo4jInstallationSystemPostfix} for operating system type ${OSTYPE}" |
| 79 | + |
| 80 | + neo4jDownloadArchiveFileName="${NEO4J_INSTALLATION_NAME}-${neo4jInstallationSystemPostfix}" |
| 81 | + source "${SCRIPTS_DIR}/download.sh" --url "https://dist.neo4j.org/${neo4jDownloadArchiveFileName}" || exit 1 |
76 | 82 |
|
77 | | - # Extract the tar file |
78 | | - tar -xf "${SHARED_DOWNLOADS_DIRECTORY}/${neo4jDownloadArchiveFileName}" --directory "${TOOLS_DIRECTORY}" || exit 1 |
| 83 | + if [[ ${neo4jInstallationSystemPostfix} == "unix.tar.gz" ]]; then |
| 84 | + # Extract the unix tar file |
| 85 | + tar -xf "${SHARED_DOWNLOADS_DIRECTORY}/${neo4jDownloadArchiveFileName}" --directory "${TOOLS_DIRECTORY}" || exit 1 |
| 86 | + else |
| 87 | + # Unpack the windows ZIP file (-q option for less verbose output, ignore warnings (backslash) with || true) |
| 88 | + unzip -q "${SHARED_DOWNLOADS_DIRECTORY}/${neo4jDownloadArchiveFileName}" -d "${TOOLS_DIRECTORY}" || true |
| 89 | + fi |
79 | 90 |
|
80 | 91 | # Fail if Neo4j hadn't been downloaded successfully |
81 | 92 | if [ ! -d "${NEO4J_INSTALLATION_DIRECTORY}" ] ; then |
@@ -136,7 +147,7 @@ if [ ! -d "${NEO4J_INSTALLATION_DIRECTORY}" ] ; then |
136 | 147 |
|
137 | 148 | # Set initial password for user "neo4j" otherwise the default password "neo4j" would need to be changed immediately (prompt). |
138 | 149 | # This needs to be done after the configuration changes. |
139 | | - source ${SCRIPTS_DIR}/setupNeo4jInitialPassword.sh |
| 150 | + source "${SCRIPTS_DIR}/setupNeo4jInitialPassword.sh" |
140 | 151 |
|
141 | 152 | echo "setupNeo4j: Installed sucessfully" |
142 | 153 | else |
|
146 | 157 | # Download and Install the Neo4j Plugin "Awesome Procedures for Neo4j" (APOC) |
147 | 158 | if [ ! -f "${NEO4J_PLUGINS}/${NEO4J_APOC_PLUGIN_ARTIFACT}" ] ; then |
148 | 159 |
|
149 | | - source ${SCRIPTS_DIR}/download.sh --url "https://github.com/${NEO4J_APOC_PLUGIN_GITHUB}/releases/download/${NEO4J_APOC_PLUGIN_VERSION}/${NEO4J_APOC_PLUGIN_ARTIFACT}" || exit 1 |
| 160 | + source "${SCRIPTS_DIR}/download.sh" --url "https://github.com/${NEO4J_APOC_PLUGIN_GITHUB}/releases/download/${NEO4J_APOC_PLUGIN_VERSION}/${NEO4J_APOC_PLUGIN_ARTIFACT}" || exit 1 |
150 | 161 |
|
151 | 162 | # Uninstall previously installed Neo4j Plugin "Awesome Procedures for Neo4j" (APOC) |
152 | 163 | rm -f "${NEO4J_PLUGINS}/apoc*.jar" |
|
192 | 203 |
|
193 | 204 | if [ ! -f "${NEO4J_PLUGINS}/${neo4jGraphDataScienceReleaseArtifact}" ] ; then |
194 | 205 | # Download the Neo4j Plugin "Graph Data Science" (GDS) |
195 | | - source ${SCRIPTS_DIR}/download.sh --url "${neo4jGraphDataScienceDownloadUrl}/${neo4jGraphDataScienceReleaseArtifact}" || exit 1 |
| 206 | + source "${SCRIPTS_DIR}/download.sh" --url "${neo4jGraphDataScienceDownloadUrl}/${neo4jGraphDataScienceReleaseArtifact}" || exit 1 |
196 | 207 |
|
197 | 208 | # Uninstall previously installed Neo4j Plugin "Graph Data Science" (GDS) |
198 | 209 | rm -f "${NEO4J_PLUGINS}/*graph-data-science*.jar" |
|
0 commit comments