This repository has been archived by the owner on Sep 24, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathenv.sh
57 lines (50 loc) · 2.32 KB
/
env.sh
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
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export _ENV_VERSION=${_ENV_VERSION:-stable}
### Special rules on syntax ###
#
# To add a variable that should default to itself or another variable:
# e.g., set VAR to VAR if set otherwise PATH:
# export VAR=${VAR:=$PATH}
#
# To add a variable that should default to itself or something hard-coded:
# e.g., set VAR to VAR if set otherwise "FOO":
# export VAR=${VAR:-FOO}
### PATHS ###
export _ENV_TOPDIR="${_ENV_TOPDIR:="$DIR"}"
export _ENV_SCRIPTS="${_ENV_SCRIPTS:="$_ENV_TOPDIR/scripts"}"
export _ENV_TOOLS="${_ENV_TOOLS:="$_ENV_TOPDIR/tools"}"
export _ENV_JAVA="${_ENV_JAVA:="$_ENV_TOPDIR/java"}"
export _ENV_JAVA_SRC="${_ENV_JAVA_SRC:="$_ENV_JAVA/src"}"
export _ENV_CLOJURE="${_ENV_CLOJURE:="$_ENV_TOPDIR/clojure"}"
export _ENV_PYTHON="${_ENV_PYTHON:="$_ENV_TOPDIR/python"}"
export _ENV_PYTHON_SRC="${_ENV_PYTHON_SRC:="$_ENV_PYTHON/src"}"
export _ENV_DEPS="${_ENV_DEPS:="$_ENV_JAVA/deps"}"
export _ENV_DOCS="${_ENV_DOCS:="$_ENV_TOPDIR/docs"}"
export _ENV_REST_DOCS="${_ENV_REST_DOCS:="$_ENV_DOCS/rest"}"
export _ENV_JAVA_DOCS="${_ENV_JAVA_DOCS:="$_ENV_DOCS/java"}"
export _ENV_VENDOR_HOME="${_ENV_VENDOR_HOME:="$_ENV_TOOLS/vendor"}"
### SETTINGS ###
export _ENV_PORT=${_ENV_PORT:-60000}
export _ENV_OVERRIDE="${_ENV_OVERRIDE:="$_ENV_TOPDIR/env.sh.custom"}"
export _ENV_BEL_ROOT="${_ENV_BEL_ROOT:="$_ENV_TOPDIR/framework"}"
export _ENV_BEL_CACHE="${_ENV_BEL_CACHE:="$_ENV_BEL_ROOT/cache"}"
export _ENV_BEL_WORK="${_ENV_BEL_WORK:="$_ENV_BEL_ROOT/work"}"
DEFAULT_DBURL="jdbc:derby:${_ENV_BEL_ROOT}/db;create=true;"
export _ENV_BEL_DBURL="${_ENV_BEL_DBURL:="$DEFAULT_DBURL"}"
DEFAULT_RESIDX="http://resource.belframework.org/belframework/1.0/index.xml"
export _ENV_BEL_RESIDX="${_ENV_BEL_RESIDX:="$DEFAULT_RESIDX"}"
export _ENV_MONGO_DB=${_ENV_MONGO_DB:-bel}
export _ENV_MONGO_HOST=${_ENV_MONGO_HOST:-localhost}
### MISCELLANEOUS ###
# Convention for required Python dependencies
export _ENV_REQ_DEPS=${_ENV_REQ_DEPS:-deps.req}
# Convention for optional Python dependencies
export _ENV_OPT_DEPS=${_ENV_OPT_DEPS:-deps.opt}
### MISCELLANEOUS ###
# Convention for required Python dependencies
export _ENV_REQ_DEPS=${_ENV_REQ_DEPS:-deps.req}
# Convention for optional Python dependencies
export _ENV_OPT_DEPS=${_ENV_OPT_DEPS:-deps.opt}
if [ -r "${_ENV_OVERRIDE}" ]; then
source ${_ENV_OVERRIDE} || exit 1
fi