Skip to content

Commit a9ef838

Browse files
authored
Merge pull request #1750 from vladak/indexpart_usage
fix indexpart usage
2 parents b792832 + a0e819e commit a9ef838

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

OpenGrok

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,13 @@ Usage()
107107
echo ""
108108
echo "Usage: ${progname} <bootstrap|deploy|derby|update|updateQuietly|usage|help>"
109109
echo " ${progname} index [<directory>]"
110-
echo " ${progname} indexpart <src_root> <directory1> [..]"
110+
echo " ${progname} indexpart <directory_1> [<directory_2> ..]"
111111
echo " ${progname} clearHistory <src_root> <repository_name>"
112112
echo ""
113+
echo " The \"indexpart\" assumes that it will be run with configuration"
114+
echo " pointed to via the OPENGROK_READ_XML_CONFIGURATION environment"
115+
echo " variable."
116+
echo ""
113117
echo " Optional environment variables:"
114118
echo " OPENGROK_CONFIGURATION - location of your configuration"
115119
echo " e.g. $ OPENGROK_CONFIGURATION=/var/opengrok/myog.conf ${0} ... "
@@ -1053,12 +1057,14 @@ case "${1}" in
10531057
;;
10541058

10551059
indexpart)
1056-
if [ $# -ne 3 ]
1060+
if [ $# -ne 2 ]
10571061
then
10581062
Usage
10591063
fi
1060-
SRC_ROOT="${2}"
1061-
shift 2
1064+
shift
1065+
if [ -z "$OPENGROK_READ_XML_CONFIGURATION" ]; then
1066+
FatalError "need configuration via OPENGROK_READ_XML_CONFIGURATION"
1067+
fi
10621068
ValidateConfiguration
10631069
CreateRuntimeRequirements
10641070
UpdateDataPartial $@

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ It basically works like this:
350350
2. index the project. It will become searchable after that.
351351

352352
OPENGROK_READ_XML_CONFIGURATION=/var/opengrok/etc/configuration.xml \
353-
OpenGrok indexpart /var/opengrok/src /foo
353+
OpenGrok indexpart /foo
354354

355355
3. make the project "indexed" status of the project persistent so that if
356356
webapp is redeployed the project will be still visible:

0 commit comments

Comments
 (0)