| #!/usr/bin/env bash |
| |
| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| ## Run Fuseki, include development code if it looks like it's available. |
| ## Or --pages= |
| |
| export FUSEKI_HOME=${FUSEKI_HOME:-$HOME/Jena/jena-fuseki1} |
| if [ ! -e $FUSEKI_HOME ] |
| then |
| echo "$FUSEKI_HOME does not exist" 1>&2 |
| exit 1 |
| fi |
| if [ ! -d $FUSEKI_HOME ] |
| then |
| echo "$FUSEKI_HOME exists but is not a directory" 1>&2 |
| exit 1 |
| fi |
| |
| CP="$(. $FUSEKI_HOME/run_cp)" |
| |
| if [ -e "$FUSEKI_HOME/classes" ] |
| then |
| CP="$FUSEKI_HOME/classes:$CP" |
| elif [ -e "$FUSEKI_HOME/target/classes" ] |
| then |
| CP="$FUSEKI_HOME/target/classes:$CP" |
| else |
| echo "No Fuseki1 classes" 2>&1 |
| fi |
| |
| # Prepend any development directories here |
| DEVDIRS="jena-core jena-tdb jena-arq jena-text" |
| for X in $DEVDIRS |
| do |
| CPX="$FUSEKI_HOME/../$X/classes" |
| if [ -e "$CPX" ] |
| then |
| CP="$CPX:$CP" |
| fi |
| done |
| |
| FUSEKI_LOG=${FUSEKI_LOG:-} |
| JVM_ARGS="${JVM_ARGS:--Xmx1200M}" |
| #JVM_ARGS="$JVM_ARGS -XX:MaxDirectMemorySize=1G" |
| |
| #echo $CP |
| |
| exec java -cp "$CP" $JVM_ARGS $FUSEKI_LOG org.apache.jena.fuseki.FusekiCmd \ |
| --home="$FUSEKI_HOME" "$@" |