Skip to content

Commit

Permalink
add the OPENGROK_DEFAULT_PROJECTS env var
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Kotal committed Apr 24, 2018
1 parent 912d897 commit ddad4dc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions OpenGrok
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ Supported Environment Variables for configuring the default setup:
- OPENGROK_ENABLE_PROJECTS Enable projects, where every directory in
SRC_ROOT is considered a separate project.
on|off (default on) (^)
- OPENGROK_DEFAULT_PROJECTS List of projects (relative to source root,
starting with slash) separated with comma to be
selected by default in the UI.
- OPENGROK_IGNORE_PATTERNS Set ignored patterns for indexer to skip.
OPENGROK_IGNORE_PATTERNS="-i dummy"
OPENGROK_IGNORE_PATTERNS="-i f:dummy"
Expand Down Expand Up @@ -311,6 +314,15 @@ DefaultInstanceConfiguration()
*) ENABLE_PROJECTS="-P" ;;
esac

if [ -n "${ENABLE_PROJECTS}" ]
then
DEFAULT_PROJECTS=""
for proj in $( IFS=","; echo ${OPENGROK_DEFAULT_PROJECTS} )
do
DEFAULT_PROJECTS="-p $proj ${DEFAULT_PROJECTS}"
done
fi

# OPTIONAL: Scanning Options (for Mercurial repositories)
SCAN_FOR_REPOSITORY="-S"
if [ -n "${OPENGROK_SCAN_REPOS}" ]
Expand Down Expand Up @@ -883,6 +895,7 @@ StdInvocation()
-W ${XML_CONFIGURATION} \
${SCAN_FOR_REPOSITORY} \
${ENABLE_PROJECTS} \
${DEFAULT_PROJECTS} \
-s "${SRC_ROOT}" \
-d "${DATA_ROOT}" \
"${@}"
Expand Down

0 comments on commit ddad4dc

Please sign in to comment.