OpenGrok revision 0ca9a2c194523c517c3aafe5758e217ac88d6baa
0N/A# OpenGrok Wrapper (initial setup and cron job updating) 0N/A# targeted against OpenSolaris + Debian , tomcat6 and glassfish 0N/A# `date +%Y-%m-%d-%H-%M` 0N/A echo "Usage: ${0} <deploy|update|updateQuietly|updateConfiguration|usage>" 1>&2 0N/A echo "Optional env variables: "1>&2 0N/Aif [ -n
"${OPENGROK_CONFIGURATION}" -a -f
"${OPENGROK_CONFIGURATION}" ]
0N/A # Load the Local OpenGrok Configuration Environment 0N/A .
"${OPENGROK_CONFIGURATION}" 0N/A # Use the built-in defaults. This section can be copied to its own 0N/A # file and tailored to your local requirements. Then simply set 0N/A # this wrapper. It will save you hand editing in your settings 0N/A # on each new release. A sample Cron Entry might look like: 0N/A # Note: below is doing some small autodetection, use own config in case it fails 0N/A # Note: It is not really possible to ever provided defaults for 0N/A # these values which will run in every UNIX-like environment. 0N/A # So I have provided a set which are functional for a given 0N/A # environment on which you can based you own configuration. 0N/A # Setup a standard execution environment 0N/A if [ x
"$OS" = x
"SunOS" ];
then 0N/A elif [ x
"$OS" = x
"Linux" ];
then 0N/A # BINARYBASE="./" in case of local execution ... 0N/A # (your source code or the root of all repositories) 0N/A # 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 # (the configuration used by Web/GUI interfaces) # 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) if [ x
"$OS" = x
"SunOS" ];
then elif [ x
"$OS" = x
"Linux" ];
then if [ x
"$OS" = x
"SunOS" ];
then #JAVA_HOME="/usr/jdk/latest/" # if we will be backwards compatible elif [ x
"$OS" = x
"Linux" ];
then # REQUIRED: Java Virtual Machine # OPTIONAL: Uncomment the following line if your source contains Mercurial repositories. # OPTIONAL: Override Built-in Properties #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) # Be Quiet? (set indirectly by command line arguments in the main program) # or alternatively, Be Verbose! echo "Exuberant ctags for $OS: $EXCTAGS not found or not executable, exiting until this dependency is resolved ..." echo "The source path: $SRC_ROOT doesn't exist, exiting cowardly ..." echo "Index path $DATA_ROOT nonexistent, attempting to create one ... " # The variable "DO" can usefully be set to "echo" to aid in script debugging # OPTIONAL : Update the EftarFile data if [ -n "${PATH_DESC}" -o -s "${PATH_DESC}" ] # detection mechanism could be better, but as a starter this will do the job, # if you expect more, write it, we accept patches ! if [ x"$OS" = x"SunOS" ]; then elif [ x"$OS" = x"Linux" ]; then # test whether glassfish is there, only if tomcat webapp dir is not present error "$WARDIR doesn't exist, seems this combination of application container and $OS is unsupported" echo "OpenGrok should be listening on HOST:PORT/source , where HOST and PORT are configured in your $CONTAINER." echo "There was a problem copying the web archive to target directory, consult error message above."