mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-18 07:23:08 +00:00

Also fix some incorrect comments and remove insignificant differences between 'start-handle-server' and 'dspace'.
46 lines
1.3 KiB
Bash
46 lines
1.3 KiB
Bash
#!/bin/sh
|
|
###########################################################################
|
|
# The contents of this file are subject to the license and copyright
|
|
# detailed in the LICENSE and NOTICE files at the root of the source
|
|
# tree and available online at
|
|
#
|
|
# http://www.dspace.org/license/
|
|
###########################################################################
|
|
# 'dspace' script
|
|
# This is a Unix shell script for running a command-line DSpace tool.
|
|
# It sets the CLASSPATH appropriately before invoking Java.
|
|
|
|
# Assume that this script is in the bin subdirectory of the DSpace installation directory.
|
|
BINDIR=`dirname $0`
|
|
DSPACEDIR=`cd "$BINDIR/.." ; pwd`
|
|
|
|
# Get the JARs in $DSPACEDIR/lib
|
|
JARS="$DSPACEDIR/lib/*"
|
|
|
|
# Class path for DSpace will be:
|
|
# Any existing classpath
|
|
# The JARs (lib/*.jar)
|
|
# The configuration directory
|
|
if [ "$CLASSPATH" = "" ]; then
|
|
FULLPATH=$JARS:$DSPACEDIR/config
|
|
else
|
|
FULLPATH=$CLASSPATH:$JARS:$DSPACEDIR/config
|
|
fi
|
|
|
|
# If the user only wants the CLASSPATH, just give it now.
|
|
if [ "$1" = "classpath" ]; then
|
|
echo $FULLPATH
|
|
exit 0
|
|
fi
|
|
|
|
#Allow user to specify java options through JAVA_OPTS variable
|
|
if [ "$JAVA_OPTS" = "" ]; then
|
|
#Default Java to use 256MB of memory
|
|
JAVA_OPTS="-Xmx256m -Dfile.encoding=UTF-8"
|
|
fi
|
|
|
|
# Now invoke Java
|
|
java $JAVA_OPTS \
|
|
-classpath $FULLPATH \
|
|
org.dspace.app.launcher.ScriptLauncher "$@"
|