Skip to content

Commit 5224503

Browse files
authored
Merge pull request #1790 from vladak/opengrok_src_root
Opengrok src root
2 parents 9ce9e4d + 8ce0520 commit 5224503

File tree

1 file changed

+7
-32
lines changed

1 file changed

+7
-32
lines changed

OpenGrok

Lines changed: 7 additions & 32 deletions
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
@@ -104,7 +105,7 @@ Usage()
104105

105106
exec >&2
106107
echo ""
107-
echo "Usage: ${progname} <bootstrap|deploy|derby|update|updateQuietly|usage|help>"
108+
echo "Usage: ${progname} <bootstrap|deploy|update|updateQuietly|usage|help>"
108109
echo " ${progname} index [<directory>]"
109110
echo " ${progname} indexpart <directory_1> [<directory_2> ..]"
110111
echo " ${progname} clearHistory <src_root> <repository_name>"
@@ -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)
@@ -969,30 +974,6 @@ DeployWar()
969974
Progress
970975
}
971976

972-
DerbyServer()
973-
{
974-
case "${OS_NAME}:${OS_VERSION}" in
975-
SunOS:5.10) Error "unsupported OS" ;;
976-
SunOS:5.11)
977-
/sbin/svcadm enable javadb
978-
;;
979-
SunOS:5.12)
980-
echo "Below might need your socket permission setup"
981-
echo "see JDK1.7_51 release notes"
982-
set -x
983-
mkdir -p $DATA_ROOT/derby
984-
java -Dderby.system.home=$DATA_ROOT/derby \
985-
-jar /usr/jdk/instances/jdk1.7.0/db/lib/derbynet.jar start
986-
;;
987-
Linux:*)
988-
mkdir -p $DATA_ROOT/derby
989-
java -Dderby.system.home=$DATA_ROOT/derby \
990-
-jar /usr/lib/jvm/java-6-sun/db/lib/derbynet.jar start
991-
;;
992-
*) Error "unsupported OS" ;;
993-
esac
994-
}
995-
996977
#
997978
# Clear history index for given project.
998979
#
@@ -1020,12 +1001,6 @@ case "${1}" in
10201001
DeployWar
10211002
;;
10221003

1023-
derby)
1024-
ValidateConfiguration
1025-
CreateRuntimeRequirements
1026-
DerbyServer
1027-
;;
1028-
10291004
update)
10301005
ValidateConfiguration
10311006
CreateRuntimeRequirements

0 commit comments

Comments
 (0)