sh.client.fedora-purge.sh Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fcrepo-client Show documentation
Show all versions of fcrepo-client Show documentation
The Fedora Client is a Java Library that allows API access to a Fedora Repository. The client is typically one part of a full Fedora installation.
The newest version!
#!/bin/sh
if [ "$FEDORA_HOME" = "" ]; then
echo "ERROR: Environment variable, FEDORA_HOME must be set."
exit 1
fi
if [ ! -f "$FEDORA_HOME/client/fedora-client.jar" ]; then
echo "ERROR: FEDORA_HOME does not appear correctly set."
echo "Client cannot be found at $FEDORA_HOME/client/fedora-client.jar"
exit 1
fi
if [ "$FEDORA_JAVA_HOME" = "" ]; then
if [ "$JAVA_HOME" = "" ]; then
echo "ERROR: FEDORA_JAVA_HOME was not defined, nor was (the fallback) JAVA_HOME."
exit 1
else
THIS_JAVA_HOME=$JAVA_HOME
fi
else
THIS_JAVA_HOME=$FEDORA_JAVA_HOME
fi
if [ ! -f "$THIS_JAVA_HOME/bin/java" ]; then
echo "ERROR: java was not found in $THIS_JAVA_HOME"
echo "Make sure FEDORA_JAVA_HOME or JAVA_HOME is set correctly."
exit 1
fi
if [ ! -f "$THIS_JAVA_HOME/bin/orbd" ]; then
echo "ERROR: java was found in $THIS_JAVA_HOME, but it was not version 1.4"
echo "Make sure FEDORA_JAVA_HOME or JAVA_HOME points to a 1.4JRE/JDK base."
exit 1
fi
echo "Purging $4..."
OLD_JAVA_HOME=$JAVA_HOME
JAVA_HOME=$THIS_JAVA_HOME
export JAVA_HOME
(exec $JAVA_HOME/bin/java -Xms64m -Xmx96m -cp $FEDORA_HOME/client:$FEDORA_HOME/client/fedora-client.jar \
-Djavax.net.ssl.trustStore=$FEDORA_HOME/client/truststore \
-Djavax.net.ssl.trustStorePassword=tomcat \
-Dfedora.home=$FEDORA_HOME \
-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl \
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl \
fedora.client.utility.AutoPurger $1 $2 $3 $4 $5 $6)
JAVA_HOME=$OLD_JAVA_HOME
export JAVA_HOME
exit 0
© 2015 - 2025 Weber Informatics LLC | Privacy Policy