-
Notifications
You must be signed in to change notification settings - Fork 1
/
.neoenv
executable file
·61 lines (56 loc) · 1.79 KB
/
.neoenv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
# Copyright (c) 2002-2015 "Neo Technology,"
# Network Engine for Objects in Lund AB [http://neotechnology.com]
#
# This file is part of Neo4j.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
DIST="http://dist.neo4j.org"
MILESTONE_DIST="http://dist.neo4j.org"
NIGHTLY_DIST="http://alpha.neohq.net/dist"
VERSIONS="2.3.0 2.2.6 2.1.8 2.0.4"
MILESTONE_VERSION="3.0.0-M01"
NIGHTLY_VERSION="3.0.0-M01-NIGHTLY"
EDITION="community"
VERSION="2.3.0"
NEOKIT_HOME="${HOME}/.neokit"
NEOKIT_DIST="${NEOKIT_HOME}/dist"
NEOKIT_RUN="${NEOKIT_HOME}/run"
function set_version {
if [ "${VERSION}" == "nightly" ]
then
VERSION_DIST=${NIGHTLY_DIST}
VERSION_NUMBER=${NIGHTLY_VERSION}
elif [ "${VERSION}" == "milestone" ]
then
VERSION_DIST=${MILESTONE_DIST}
VERSION_NUMBER=${MILESTONE_VERSION}
else
VERSION_DIST=${DIST}
VERSION_NUMBER=${VERSION}
fi
}
function set_archive {
set_version
ARCHIVE_KEY="${EDITION}-${VERSION_NUMBER}"
ARCHIVE_NAME="neo4j-${ARCHIVE_KEY}-unix.tar.gz"
DOWNLOAD_DIR="$1"
if [ "${DOWNLOAD_DIR}" == "" ]
then
ARCHIVE_PATH="${ARCHIVE_NAME}"
else
mkdir -p ${DOWNLOAD_DIR} 2> /dev/null
ARCHIVE_PATH="${DOWNLOAD_DIR}/${ARCHIVE_NAME}"
fi
ARCHIVE_URL="${VERSION_DIST}/${ARCHIVE_NAME}"
}