Files
DSpace/dspace/bin/dspace
Mark H. Wood 60d41b86f2 Shorten the argument to -classpath by making the JRE enumerate library JARs.
Also fix some incorrect comments and remove insignificant differences
between 'start-handle-server' and 'dspace'.
2022-10-03 16:36:35 -04:00

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 "$@"