OpenGrok revision 294
#
# OpenGrok Wrapper (Interactive GUI, Initial Generation and Cron Job Updating)
#
#
# Usage
#
Usage()
{
echo 1>&2
echo "Usage: ${0} <update|updateQuietly|updateConfiguration|usage|gui>" 1>&2
echo 1>&2
exit 1
}
#
# Configuration
#
if [ -n "${OPENGROK_CONFIGURATION}" -a -f "${OPENGROK_CONFIGURATION}" ]
then
# Load the Local OpenGrok Configuration Environment
. "${OPENGROK_CONFIGURATION}"
else
# Use the built-in defaults. This section can be copied to its own
# file and tailored to your local requirements. Then simply set
# OPENGROK_CONFIGURATION=/path/to/your/configuration, before using
# this wrapper. It will save you hand editing in your settings
# on each new release. A sample Cron Entry might look like:
# Note: It is not really possible to ever provided defaults for
# these values which will run in every UNIX-like environment.
# So I have provided a set which are functional for a given
# environment on which you can based you own configuration.
# Setup a standard execution environment
then
fi
# REQUIRED: Source Code/Repository Root
# (your source code or the root of all repositories)
# REQUIRED: OpenGrok Generate Data Root
# (for Lucene index and hypertext cross-references)
# This area is rebuilt by "update" / "updateQuietly"
# OPTIONAL: User Provided Source Path to Description Mapping (Tab Separated Value)
# (The user maintained source of the generated EftarFile file)
# REQUIRED: XML Configuration
# REQUIRED: Java Archive of OpenGrok
# (user building from source code will find this other key
# files in the "dist" directory after the build is completed)
# REQUIRED: Exuberant CTags (http://ctags.sf.net)
# REQUIRED: Java Home
export JAVA_HOME
# REQUIRED: Java Virtual Machine
# OPTIONAL: Uncomment the following line if your source contains Mercurial repositories.
SCAN_FOR_REPOSITORY="-S"
# OPTIONAL: Override Built-in Properties
# OPTIONAL: JVM Options
#JAVA_OPTS="-server -Xmx1024m"
# DELIVERED: An update program for EftarFile
# Usage: <class> inputFile [inputFile ...] outputFile
# EftarFile == An Extremely Fast Tagged Attribute Read-only File System
# HARDCODED: Generated EftarFile (See web/*.jsp)
EFTAR_OUTPUT_FILE="${DATA_ROOT}/index/dtags.eftar"
# Be Quiet? (set indirectly by command line arguments in the main program)
# or alternatively, Be Verbose!
#VERBOSE="-v"
fi
#
# Implementation
#
# The variable "DO" can usefully be set to "echo" to aid in script debugging
{
${DO} ${JAVA} ${JAVA_OPTS} ${PROPERTIES} \
-jar ${OPENGROK_JAR} \
${SCAN_FOR_REPOSITORY} ${VERBOSE} ${QUIET} \
${EXUBERANT_CTAGS:+-c} ${EXUBERANT_CTAGS} \
"${@}"
}
{
}
{
}
{
# OPTIONAL : Update the EftarFile data
if [ -n "${PATH_DESC}" -o -s "${PATH_DESC}" ]
then
${DO} ${JAVA} -classpath ${OPENGROK_JAR} \
${EFTAR_UPDATE} ${PATH_DESC} ${EFTAR_OUTPUT_FILE}
fi
}
{
${DO} ${JAVA} ${JAVA_OPTS} -jar ${OPENGROK_JAR} &
}
{
${DO} ${JAVA} ${JAVA_OPTS} -jar ${OPENGROK_JAR} '-?'
}
#
# Main Program
#
if [ $# -ne 1 ]
then
fi
case "${1}" in
;;
QUIET="-q"
VERBOSE=""
;;
;;
;;
gui)
;;
*)
;;
esac
#
# End of File
#