OpenGrok revision 3b0448fdd830b8d04c6a71511e5d26a4fc3b5b80
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# OpenGrok Wrapper (initial setup and cron job updating)
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Supported Operating Systems:
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# - Solaris 10 (SunOS 5.10)
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# - Solaris 11 (SunOS 5.11)
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - Debian (Linux)
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# Supported Deployment Engines:
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - Tomcat 5.5
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# Supported Environment Variables:
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_NON_INTERACTIVE Suppress Progress and Warnings Messages (*)
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_STANDARD_ENV Run Time Shell Environment (Shell Script)
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_CONFIGURATION User Configuration (Shell Script)
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# Supported Environment Variables for configuring the default setup:
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_DISTRIBUTION_BASE Base Directory of the OpenGrok Distribution
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_INSTANCE_BASE Base Directory of the OpenGrok User Data Area
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - EXUBERANT_CTAGS Full Path to Exuberant CTags
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_CTAGS_OPTIONS_FILE Full path to file with extra command line
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# options for CTags program (for its --options
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# switch), default is DATA_ROOT/etc/ctags.config
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - JAVA_HOME Full Path to Java Installation Root
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - JAVA Full Path to java binary
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - JAVA_OPTS Java options
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_APP_SERVER Application Server ("Tomcat" or "Glassfish")
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_WAR_TARGET_TOMCAT Tomcat Specific WAR Target Directory
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_WAR_TARGET_GLASSFISH Glassfish Specific WAR Target Directory
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# - OPENGROK_WAR_TARGET Fallback WAR Target Directory
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_TOMCAT_BASE Base Directory for Tomcat (contains webapps)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# - OPENGROK_GLASSFISH_BASE Base Directory for Glassfish
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# (contains domains)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# - OPENGROK_GLASSFISH_DOMAIN Preferred Glassfish Domain Name
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_VERBOSE Enable Verbose Mode in opengrok.jar (*)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# - OPENGROK_PROGRESS Shows progress in %(percentage) of working
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# through project, it's good to have Verbose
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Mode enabled too, cost of this is one more
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# traversal of the project before indexing it(*)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# - OPENGROK_REMOTE_REPOS_OFF Disable History Cache for (remote)
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User# Repositories (*)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# - OPENGROK_SCAN_REPOS Disable Scan for repositories (*)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# - OPENGROK_SCAN_DEPTH how deep should scanning for repos go
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# (by default 3 directories from SRC_ROOT)
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_WEBAPP_CFGADDR Web app address to send configuration to
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# (use "none" to avoid sending it to web app)
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_WPREFIX Disable wildcard prefix search query
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# support (*)
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - OPENGROK_DERBY if set, then indexer tries to use derby as
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# historycache (see derby command of this
7e71f05d8643aca84914437c900cb716444507e4Tinderbox User# - OPENGROK_TAG Enable parsing of revision tags into the History
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# - READ_XML_CONFIGURATION file with read only configuration
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# - temporary workaround for bug # 327
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# (*) Any Non-Empty String will enable these options
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# Print usage to stdout and exit.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User echo "Usage: ${progname} <deploy|derby|update|updateQuietly|usage|help>"
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt echo " OPENGROK_CONFIGURATION - location of your configuration"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User echo " e.g. $ OPENGROK_CONFIGURATION=/var/opengrok/myog.conf ${0} ... "
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt echo " See the code for more information on configuration options /" \
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# Runtime Configuration
b66b333f59cf51ef87f973084a5023acd9317fb2Evan Hunt# TODO: Handle symlinks correctly (especially in ${0})
export JAVA_HOME
${CVS:+-Dorg.opensolaris.opengrok.history.cvs=$CVS} \
${SCCS:+-Dorg.opensolaris.opengrok.history.SCCS=$SCCS} \
${CLEARCASE:+-Dorg.opensolaris.opengrok.history.ClearCase=$CLEARCASE} \
${GIT:+-Dorg.opensolaris.opengrok.history.git=$GIT} \
${DO} exit 2
for f in $@
echo $file
if test $? -eq 1
if test $? -ne 0
echo ${binary}
Linux:*)
if [ -f /etc/alternatives/java ]
/usr/lib/jvm/sun-jre-1.6 \
${OPENGROK_TOMCAT_BASE} \
if [ ! -d ${OPENGROK_INSTANCE_BASE}/log ]
${DO} mkdir ${OPENGROK_INSTANCE_BASE}/log
${DO} mkdir -p ${OPENGROK_INSTANCE_BASE}/derby
${DO} ${JAVA} ${JAVA_OPTS} ${PROPERTIES} \
${LOGGER_PROPERTIES} \
${JAVA_DEBUG} \
-jar ${OPENGROK_JAR} \
${IGNORE_PATTERNS} ${ENABLE_PROJECTS} \
${DERBY_HISTORY_CACHE} \
${HISTORY_TAGS} \
${SCAN_DEPTH} \
${PROGRESS} \
${EXUBERANT_CTAGS:+-c} ${EXUBERANT_CTAGS} \
${CTAGS_OPTIONS_FILE:+-o} ${CTAGS_OPTIONS_FILE} \
${MAX_INDEXED_WORDS} ${SKIN} ${LEADING_WILDCARD} \
${READ_XML_CONF} \
-W ${XML_CONFIGURATION} \
${WEBAPP_CONFIG} \
${DO} ${JAVA} -classpath ${OPENGROK_JAR} \
${EFTAR_UPDATE} ${PATH_DESC} ${EFTAR_OUTPUT_FILE}
SunOS:5.11)
Linux:*)
mkdir -p $DATA_ROOT/derby