Skip to content

Commit 74bb8f9

Browse files
author
Vladimir Kotal
committed
add the OPENGROK_DEFAULT_PROJECTS env var
1 parent 912d897 commit 74bb8f9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

OpenGrok

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ Supported Environment Variables for configuring the default setup:
111111
- OPENGROK_ENABLE_PROJECTS Enable projects, where every directory in
112112
SRC_ROOT is considered a separate project.
113113
on|off (default on) (^)
114+
- OPENGROK_DEFAULT_PROJECTS List of projects (relative to source root,
115+
starting with slash) separated with comma to be
116+
selected by default in the UI.
114117
- OPENGROK_IGNORE_PATTERNS Set ignored patterns for indexer to skip.
115118
OPENGROK_IGNORE_PATTERNS="-i dummy"
116119
OPENGROK_IGNORE_PATTERNS="-i f:dummy"
@@ -311,6 +314,15 @@ DefaultInstanceConfiguration()
311314
*) ENABLE_PROJECTS="-P" ;;
312315
esac
313316

317+
if [ -n "${ENABLE_PROJECTS}" ]
318+
then
319+
DEFAULT_PROJECTS=""
320+
for proj in $( IFS=","; echo ${OPENGROK_DEFAULT_PROJECTS} )
321+
do
322+
DEFAULT_PROJECTS="-p $proj ${DEFAULT_PROJECTS}"
323+
done
324+
fi
325+
314326
# OPTIONAL: Scanning Options (for Mercurial repositories)
315327
SCAN_FOR_REPOSITORY="-S"
316328
if [ -n "${OPENGROK_SCAN_REPOS}" ]
@@ -883,6 +895,7 @@ StdInvocation()
883895
-W ${XML_CONFIGURATION} \
884896
${SCAN_FOR_REPOSITORY} \
885897
${ENABLE_PROJECTS} \
898+
${DEFAULT_PROJECTS} \
886899
-s "${SRC_ROOT}" \
887900
-d "${DATA_ROOT}" \
888901
"${@}"

0 commit comments

Comments
 (0)