Commit 516317e1 authored by Thodoris Nestoridis's avatar Thodoris Nestoridis
parents 8f734d18 20cee99e
@echo off
@rem Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
if "%SHACLROOT%" == "" goto :rootNotSet
set SHACL_HOME=%SHACLROOT%
:rootNotSet
if NOT "%SHACL_HOME%" == "" goto :okHome
echo SHACL_HOME not set
exit /B
:okHome
set SHACL_CP=%SHACL_HOME%\lib\*;
set LOGGING=file:%SHACL_HOME%/log4j2.properties
@rem JVM_ARGS comes from the environment.
java %JVM_ARGS% -Dlog4j.configurationFile="%LOGGING%" -cp "%SHACL_CP%" org.topbraid.shacl.tools.Infer %*
exit /B
#!/bin/sh
## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
resolveLink() {
local NAME=$1
if [ -L "$NAME" ]; then
case "$OSTYPE" in
darwin*|bsd*)
# BSD style readlink behaves differently to GNU readlink
# Have to manually follow links
while [ -L "$NAME" ]; do
NAME=$( cd $NAME && pwd -P ) ;
done
;;
*)
# Assuming standard GNU readlink with -f for
# canonicalize and follow
NAME=$(readlink -f "$NAME")
;;
esac
fi
echo "$NAME"
}
# If SHACL_HOME is empty
if [ -z "$SHACL_HOME" ]; then
SCRIPT="$0"
# Catch common issue: script has been symlinked
if [ -L "$SCRIPT" ]; then
SCRIPT=$(resolveLink "$0")
# If link is relative
case "$SCRIPT" in
/*)
# Already absolute
;;
*)
# Relative, make absolute
SCRIPT=$( dirname "$0" )/$SCRIPT
;;
esac
fi
# Work out root from script location
SHACL_HOME="$( cd "$( dirname "$SCRIPT" )/.." && pwd )"
export SHACL_HOME
fi
# If SHACL_HOME is a symbolic link need to resolve
if [ -L "${SHACL_HOME}" ]; then
SHACL_HOME=$(resolveLink "$SHACL_HOME")
# If link is relative
case "$SHACL_HOME" in
/*)
# Already absolute
;;
*)
# Relative, make absolute
SHACL_HOME=$(dirname "$SHACL_HOME")
;;
esac
export SHACL_HOME
fi
# ---- Setup
# JVM_ARGS : don't set here but it can be set in the environment.
# Expand SHACL_HOME but literal *
SHACL_CP="$SHACL_HOME"'/lib/*'
SOCKS=
LOGGING="${LOGGING:--Dlog4j.configurationFile=file:$SHACL_HOME/log4j2.properties}"
# Platform specific fixup
# On CYGWIN convert path and end with a ';'
case "$(uname)" in
CYGWIN*) SHACL_CP="$(cygpath -wp "$SHACL_CP");";;
esac
# Respect TMPDIR or TMP (windows?) if present
# important for tdbloader spill
if [ -n "$TMPDIR" ]
then
JVM_ARGS="$JVM_ARGS -Djava.io.tmpdir=\"$TMPDIR\""
elif [ -n "$TMP" ]
then
JVM_ARGS="$JVM_ARGS -Djava.io.tmpdir=\"$TMP\""
fi
java $JVM_ARGS $LOGGING -cp "$SHACL_CP" org.topbraid.shacl.tools.Infer "$@"
@echo off
@rem Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
if "%SHACLROOT%" == "" goto :rootNotSet
set SHACL_HOME=%SHACLROOT%
:rootNotSet
if NOT "%SHACL_HOME%" == "" goto :okHome
echo SHACL_HOME not set
exit /B
:okHome
set SHACL_CP=%SHACL_HOME%\lib\*;
set LOGGING=file:%SHACL_HOME%/log4j2.properties
@rem JVM_ARGS comes from the environment.
java %JVM_ARGS% -Dlog4j.configurationFile="%LOGGING%" -cp "%SHACL_CP%" org.topbraid.shacl.tools.Validate %*
exit /B
#!/bin/sh
## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
resolveLink() {
local NAME=$1
if [ -L "$NAME" ]; then
case "$OSTYPE" in
darwin*|bsd*)
# BSD style readlink behaves differently to GNU readlink
# Have to manually follow links
while [ -L "$NAME" ]; do
NAME=$( cd $NAME && pwd -P ) ;
done
;;
*)
# Assuming standard GNU readlink with -f for
# canonicalize and follow
NAME=$(readlink -f "$NAME")
;;
esac
fi
echo "$NAME"
}
# If SHACL_HOME is empty
if [ -z "$SHACL_HOME" ]; then
SCRIPT="$0"
# Catch common issue: script has been symlinked
if [ -L "$SCRIPT" ]; then
SCRIPT=$(resolveLink "$0")
# If link is relative
case "$SCRIPT" in
/*)
# Already absolute
;;
*)
# Relative, make absolute
SCRIPT=$( dirname "$0" )/$SCRIPT
;;
esac
fi
# Work out root from script location
SHACL_HOME="$( cd "$( dirname "$SCRIPT" )/.." && pwd )"
export SHACL_HOME
fi
# If SHACL_HOME is a symbolic link need to resolve
if [ -L "${SHACL_HOME}" ]; then
SHACL_HOME=$(resolveLink "$SHACL_HOME")
# If link is relative
case "$SHACL_HOME" in
/*)
# Already absolute
;;
*)
# Relative, make absolute
SHACL_HOME=$(dirname "$SHACL_HOME")
;;
esac
export SHACL_HOME
fi
# ---- Setup
# JVM_ARGS : don't set here but it can be set in the environment.
# Expand SHACL_HOME but literal *
SHACL_CP="$SHACL_HOME"'/lib/*'
SOCKS=
LOGGING="${LOGGING:--Dlog4j.configurationFile=file:$SHACL_HOME/log4j2.properties}"
# Platform specific fixup
# On CYGWIN convert path and end with a ';'
case "$(uname)" in
CYGWIN*) SHACL_CP="$(cygpath -wp "$SHACL_CP");";;
esac
# Respect TMPDIR or TMP (windows?) if present
# important for tdbloader spill
if [ -n "$TMPDIR" ]
then
JVM_ARGS="$JVM_ARGS -Djava.io.tmpdir=\"$TMPDIR\""
elif [ -n "$TMP" ]
then
JVM_ARGS="$JVM_ARGS -Djava.io.tmpdir=\"$TMP\""
fi
java $JVM_ARGS $LOGGING -cp "$SHACL_CP" org.topbraid.shacl.tools.Validate "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment