Skip to content

Commit ee155ad

Browse files
committed
Introduce OPENGROK_DATA_ROOT for better customization
1 parent 1c30da9 commit ee155ad

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

OpenGrok

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
# - OPENGROK_DISTRIBUTION_BASE Base Directory of the OpenGrok Distribution
3838
# - OPENGROK_INSTANCE_BASE Base Directory of the OpenGrok User Data Area
3939
# - OPENGROK_SRC_ROOT directory with files to be indexed
40+
# - OPENGROK_DATA_ROOT directory where index and cache files are generated
4041
# - OPENGROK_CTAGS Full path to Exuberant or Universal CTags binary
4142
# - OPENGROK_CTAGS_OPTIONS_FILE Full path to file with extra command line
4243
# options for CTags program (for its --options
@@ -222,7 +223,11 @@ DefaultInstanceConfiguration()
222223
# REQUIRED: OpenGrok Generate Data Root
223224
# (for Lucene index and hypertext cross-references)
224225
# This area is rebuilt by "update" / "updateQuietly"
225-
DATA_ROOT="${OPENGROK_INSTANCE_BASE}/data"
226+
if [ -n "${OPENGROK_DATA_ROOT}" ]; then
227+
DATA_ROOT="${OPENGROK_DATA_ROOT}"
228+
else
229+
DATA_ROOT="${OPENGROK_INSTANCE_BASE}/data"
230+
fi
226231

227232
# OPTIONAL: User Provided Source Path to Description Mapping
228233
# (Tab Separated Value)

0 commit comments

Comments
 (0)