OpenGrok revision 787
787N/A# OpenGrok Wrapper (initial setup and cron job updating) 787N/A# targeted against OpenSolaris + Debian , tomcat6 and glassfish 787N/A# `date +%Y-%m-%d-%H-%M` 787N/A echo "Usage: ${0} <deploy|update|updateQuietly|updateConfiguration|usage>" 1>&2 787N/A echo "Optional env variables: "1>&2 294N/Aif [ -n
"${OPENGROK_CONFIGURATION}" -a -f
"${OPENGROK_CONFIGURATION}" ]
294N/A # Load the Local OpenGrok Configuration Environment 294N/A .
"${OPENGROK_CONFIGURATION}" 294N/A # Use the built-in defaults. This section can be copied to its own 294N/A # file and tailored to your local requirements. Then simply set 294N/A # this wrapper. It will save you hand editing in your settings 294N/A # on each new release. A sample Cron Entry might look like: 787N/A # Note: below is doing some small autodetection, use own config in case it fails 294N/A # Note: It is not really possible to ever provided defaults for 294N/A # these values which will run in every UNIX-like environment. 294N/A # So I have provided a set which are functional for a given 294N/A # environment on which you can based you own configuration. 294N/A # Setup a standard execution environment 787N/A # BINARYBASE="./" in case of local execution ... 294N/A # (your source code or the root of all repositories) 294N/A # REQUIRED: OpenGrok Generate Data Root 294N/A # (for Lucene index and hypertext cross-references) 294N/A # This area is rebuilt by "update" / "updateQuietly" 294N/A # OPTIONAL: User Provided Source Path to Description Mapping (Tab Separated Value) 294N/A # (The user maintained source of the generated EftarFile file) 294N/A # REQUIRED: XML Configuration 294N/A # REQUIRED: Java Archive of OpenGrok 294N/A # (user building from source code will find this other key 294N/A # files in the "dist" directory after the build is completed) 294N/A # REQUIRED: Java Virtual Machine 294N/A # OPTIONAL: Uncomment the following line if your source contains Mercurial repositories. 294N/A # OPTIONAL: Override Built-in Properties 294N/A # OPTIONAL: JVM Options 294N/A #JAVA_OPTS="-server -Xmx1024m" 294N/A # DELIVERED: An update program for EftarFile 294N/A # Usage: <class> inputFile [inputFile ...] outputFile 294N/A # EftarFile == An Extremely Fast Tagged Attribute Read-only File System 294N/A # HARDCODED: Generated EftarFile (See web/*.jsp) 294N/A # Be Quiet? (set indirectly by command line arguments in the main program) 294N/A # or alternatively, Be Verbose! 787N/Aecho "Exuberant ctags for $OS: $EXCTAGS not found or not executable, exiting until this dependency is resolved ..." 787N/Aecho "The source path: $SRC_ROOT doesn't exist, exiting cowardly ..." 294N/A# The variable "DO" can usefully be set to "echo" to aid in script debugging 294N/A # OPTIONAL : Update the EftarFile data 294N/A if [ -n "${PATH_DESC}" -o -s "${PATH_DESC}" ] 787N/A# detection mechanism could be better, but as a starter this will do the job, 787N/A# if you expect more, write it, we accept patches ! 787N/A# test whether glassfish is there, only if tomcat webapp dir is not present 787N/A error "$WARDIR doesn't exist, seems this combination of application container and $OS is unsupported" 787N/Aecho "There was a problem copying the web archive to target directory, consult error message above."