Skip to content

Commit b6e606a

Browse files
committed
introduce OPENGROK_SRC_ROOT for overriding source root
fixes #1789
1 parent 9ce9e4d commit b6e606a

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
@@ -18,6 +18,7 @@
1818
# Supported Environment Variables for configuring the default setup:
1919
# - OPENGROK_DISTRIBUTION_BASE Base Directory of the OpenGrok Distribution
2020
# - OPENGROK_INSTANCE_BASE Base Directory of the OpenGrok User Data Area
21+
# - OPENGROK_SRC_ROOT directory with files to be indexed
2122
# - OPENGROK_CTAGS Full path to Exuberant or Universal CTags binary
2223
# - OPENGROK_CTAGS_OPTIONS_FILE Full path to file with extra command line
2324
# options for CTags program (for its --options
@@ -186,7 +187,11 @@ DefaultInstanceConfiguration()
186187

187188
# REQUIRED: Source Code/Repository Root
188189
# (your source code or the root of all repositories)
189-
SRC_ROOT="${OPENGROK_INSTANCE_BASE}/src"
190+
if [ -n "${OPENGROK_SRC_ROOT}" ]; then
191+
SRC_ROOT="${OPENGROK_SRC_ROOT}"
192+
else
193+
SRC_ROOT="${OPENGROK_INSTANCE_BASE}/src"
194+
fi
190195

191196
# REQUIRED: OpenGrok Generate Data Root
192197
# (for Lucene index and hypertext cross-references)

0 commit comments

Comments
 (0)