You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2017/10/09 12:26:29 UTC

[2/5] jena git commit: tdb2 scripts

tdb2 scripts


Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/3ce06f89
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/3ce06f89
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/3ce06f89

Branch: refs/heads/master
Commit: 3ce06f89e2d62a63a5f79d6fb0d82a377cda60e6
Parents: 0353a77
Author: Andy Seaborne <an...@apache.org>
Authored: Sat Oct 7 13:58:09 2017 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat Oct 7 14:01:07 2017 +0100

----------------------------------------------------------------------
 .gitattributes                      |   5 ++
 apache-jena/bat/tdb2_tdbbackup.bat  |  18 ++++++
 apache-jena/bat/tdb2_tdbcompact.bat |  18 ++++++
 apache-jena/bat/tdb2_tdbdump.bat    |  18 ++++++
 apache-jena/bat/tdb2_tdbloader.bat  |  18 ++++++
 apache-jena/bat/tdb2_tdbquery.bat   |  18 ++++++
 apache-jena/bat/tdb2_tdbupdate.bat  |  18 ++++++
 apache-jena/bin/jena                | 101 +++++++++++++++++++++++++++++++
 apache-jena/bin/tdb2.tdbbackup      |  89 +++++++++++++++++++++++++++
 apache-jena/bin/tdb2.tdbcompact     |  89 +++++++++++++++++++++++++++
 apache-jena/bin/tdb2.tdbdump        |  89 +++++++++++++++++++++++++++
 apache-jena/bin/tdb2.tdbloader      |  89 +++++++++++++++++++++++++++
 apache-jena/bin/tdb2.tdbquery       |  89 +++++++++++++++++++++++++++
 apache-jena/bin/tdb2.tdbupdate      |  89 +++++++++++++++++++++++++++
 apache-jena/cmd-maker               |  39 ++++++++++++
 15 files changed, 787 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/.gitattributes
----------------------------------------------------------------------
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..2027efc
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,5 @@
+*.bat text eol=crlf
+*.png binary
+*.jpg binary
+*.gif binary
+

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bat/tdb2_tdbbackup.bat
----------------------------------------------------------------------
diff --git a/apache-jena/bat/tdb2_tdbbackup.bat b/apache-jena/bat/tdb2_tdbbackup.bat
new file mode 100644
index 0000000..a51b6a2
--- /dev/null
+++ b/apache-jena/bat/tdb2_tdbbackup.bat
@@ -0,0 +1,18 @@
+@echo off
+@rem Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+if "%JENAROOT%" == "" goto :rootNotSet
+set JENA_HOME=%JENAROOT%
+:rootNotSet
+
+if NOT "%JENA_HOME%" == "" goto :okHome
+echo JENA_HOME not set
+exit /B
+
+:okHome
+set JENA_CP=%JENA_HOME%\lib\*;
+set LOGGING=file:%JENA_HOME%/jena-log4j.properties
+
+@rem JVM_ARGS comes from the environment.
+java %JVM_ARGS% -Dlog4j.configuration="%LOGGING%" -cp "%JENA_CP%" tdb2.tdbbackup %*
+exit /B

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bat/tdb2_tdbcompact.bat
----------------------------------------------------------------------
diff --git a/apache-jena/bat/tdb2_tdbcompact.bat b/apache-jena/bat/tdb2_tdbcompact.bat
new file mode 100644
index 0000000..87fc7ae
--- /dev/null
+++ b/apache-jena/bat/tdb2_tdbcompact.bat
@@ -0,0 +1,18 @@
+@echo off
+@rem Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+if "%JENAROOT%" == "" goto :rootNotSet
+set JENA_HOME=%JENAROOT%
+:rootNotSet
+
+if NOT "%JENA_HOME%" == "" goto :okHome
+echo JENA_HOME not set
+exit /B
+
+:okHome
+set JENA_CP=%JENA_HOME%\lib\*;
+set LOGGING=file:%JENA_HOME%/jena-log4j.properties
+
+@rem JVM_ARGS comes from the environment.
+java %JVM_ARGS% -Dlog4j.configuration="%LOGGING%" -cp "%JENA_CP%" tdb2.tdbcompact %*
+exit /B

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bat/tdb2_tdbdump.bat
----------------------------------------------------------------------
diff --git a/apache-jena/bat/tdb2_tdbdump.bat b/apache-jena/bat/tdb2_tdbdump.bat
new file mode 100644
index 0000000..7ad54f9
--- /dev/null
+++ b/apache-jena/bat/tdb2_tdbdump.bat
@@ -0,0 +1,18 @@
+@echo off
+@rem Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+if "%JENAROOT%" == "" goto :rootNotSet
+set JENA_HOME=%JENAROOT%
+:rootNotSet
+
+if NOT "%JENA_HOME%" == "" goto :okHome
+echo JENA_HOME not set
+exit /B
+
+:okHome
+set JENA_CP=%JENA_HOME%\lib\*;
+set LOGGING=file:%JENA_HOME%/jena-log4j.properties
+
+@rem JVM_ARGS comes from the environment.
+java %JVM_ARGS% -Dlog4j.configuration="%LOGGING%" -cp "%JENA_CP%" tdb2.tdbdump %*
+exit /B

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bat/tdb2_tdbloader.bat
----------------------------------------------------------------------
diff --git a/apache-jena/bat/tdb2_tdbloader.bat b/apache-jena/bat/tdb2_tdbloader.bat
new file mode 100644
index 0000000..f848624
--- /dev/null
+++ b/apache-jena/bat/tdb2_tdbloader.bat
@@ -0,0 +1,18 @@
+@echo off
+@rem Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+if "%JENAROOT%" == "" goto :rootNotSet
+set JENA_HOME=%JENAROOT%
+:rootNotSet
+
+if NOT "%JENA_HOME%" == "" goto :okHome
+echo JENA_HOME not set
+exit /B
+
+:okHome
+set JENA_CP=%JENA_HOME%\lib\*;
+set LOGGING=file:%JENA_HOME%/jena-log4j.properties
+
+@rem JVM_ARGS comes from the environment.
+java %JVM_ARGS% -Dlog4j.configuration="%LOGGING%" -cp "%JENA_CP%" tdb2.tdbloader %*
+exit /B

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bat/tdb2_tdbquery.bat
----------------------------------------------------------------------
diff --git a/apache-jena/bat/tdb2_tdbquery.bat b/apache-jena/bat/tdb2_tdbquery.bat
new file mode 100644
index 0000000..33db6be
--- /dev/null
+++ b/apache-jena/bat/tdb2_tdbquery.bat
@@ -0,0 +1,18 @@
+@echo off
+@rem Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+if "%JENAROOT%" == "" goto :rootNotSet
+set JENA_HOME=%JENAROOT%
+:rootNotSet
+
+if NOT "%JENA_HOME%" == "" goto :okHome
+echo JENA_HOME not set
+exit /B
+
+:okHome
+set JENA_CP=%JENA_HOME%\lib\*;
+set LOGGING=file:%JENA_HOME%/jena-log4j.properties
+
+@rem JVM_ARGS comes from the environment.
+java %JVM_ARGS% -Dlog4j.configuration="%LOGGING%" -cp "%JENA_CP%" tdb2.tdbquery %*
+exit /B

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bat/tdb2_tdbupdate.bat
----------------------------------------------------------------------
diff --git a/apache-jena/bat/tdb2_tdbupdate.bat b/apache-jena/bat/tdb2_tdbupdate.bat
new file mode 100644
index 0000000..6d79293
--- /dev/null
+++ b/apache-jena/bat/tdb2_tdbupdate.bat
@@ -0,0 +1,18 @@
+@echo off
+@rem Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+if "%JENAROOT%" == "" goto :rootNotSet
+set JENA_HOME=%JENAROOT%
+:rootNotSet
+
+if NOT "%JENA_HOME%" == "" goto :okHome
+echo JENA_HOME not set
+exit /B
+
+:okHome
+set JENA_CP=%JENA_HOME%\lib\*;
+set LOGGING=file:%JENA_HOME%/jena-log4j.properties
+
+@rem JVM_ARGS comes from the environment.
+java %JVM_ARGS% -Dlog4j.configuration="%LOGGING%" -cp "%JENA_CP%" tdb2.tdbupdate %*
+exit /B

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bin/jena
----------------------------------------------------------------------
diff --git a/apache-jena/bin/jena b/apache-jena/bin/jena
new file mode 100755
index 0000000..be6239d
--- /dev/null
+++ b/apache-jena/bin/jena
@@ -0,0 +1,101 @@
+#!/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 JENA_HOME is empty
+if [ -z "$JENA_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
+  JENA_HOME="$( cd "$( dirname "$SCRIPT" )/.." && pwd )"
+  export JENA_HOME
+fi
+
+# If JENA_HOME is a symbolic link need to resolve
+if [ -L "${JENA_HOME}" ]; then
+  JENA_HOME=$(resolveLink "$JENA_HOME")
+  # If link is relative
+  case "$JENA_HOME" in
+    /*)
+      # Already absolute
+      ;;
+    *)
+      # Relative, make absolute
+      JENA_HOME=$(dirname "$JENA_HOME")
+      ;;
+  esac
+  export JENA_HOME
+fi
+
+# ---- Setup
+# JVM_ARGS : don't set here but it can be set in the environment.
+# Expand JENA_HOME but literal *
+JENA_CP="$JENA_HOME"'/lib/*'
+SOCKS=
+LOGGING="${LOGGING:--Dlog4j.configuration=file:$JENA_HOME/jena-log4j.properties}"
+
+# Platform specific fixup
+# On CYGWIN convert path and end with a ';' 
+case "$(uname)" in
+   CYGWIN*) JENA_CP="$(cygpath -wp "$JENA_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
+
+## ---- Determine the command.
+case "$#" in
+    0)
+	V="$(java -cp "$JENA_CP" jena.version)"
+	echo "Jena version : $V"
+	echo "Jena home    : $JENA_HOME"
+	exit
+	;;
+    
+    *) CMD="$1" ; shift ;;
+esac
+
+java $JVM_ARGS $LOGGING -cp "$JENA_CP" arq.sparql "$@" 

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bin/tdb2.tdbbackup
----------------------------------------------------------------------
diff --git a/apache-jena/bin/tdb2.tdbbackup b/apache-jena/bin/tdb2.tdbbackup
new file mode 100755
index 0000000..a11ce74
--- /dev/null
+++ b/apache-jena/bin/tdb2.tdbbackup
@@ -0,0 +1,89 @@
+#!/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 JENA_HOME is empty
+if [ -z "$JENA_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
+  JENA_HOME="$( cd "$( dirname "$SCRIPT" )/.." && pwd )"
+  export JENA_HOME
+fi
+
+# If JENA_HOME is a symbolic link need to resolve
+if [ -L "${JENA_HOME}" ]; then
+  JENA_HOME=$(resolveLink "$JENA_HOME")
+  # If link is relative
+  case "$JENA_HOME" in
+    /*)
+      # Already absolute
+      ;;
+    *)
+      # Relative, make absolute
+      JENA_HOME=$(dirname "$JENA_HOME")
+      ;;
+  esac
+  export JENA_HOME
+fi
+
+# ---- Setup
+# JVM_ARGS : don't set here but it can be set in the environment.
+# Expand JENA_HOME but literal *
+JENA_CP="$JENA_HOME"'/lib/*'
+SOCKS=
+LOGGING="${LOGGING:--Dlog4j.configuration=file:$JENA_HOME/jena-log4j.properties}"
+
+# Platform specific fixup
+# On CYGWIN convert path and end with a ';' 
+case "$(uname)" in
+   CYGWIN*) JENA_CP="$(cygpath -wp "$JENA_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 "$JENA_CP" tdb2.tdbbackup "$@" 

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bin/tdb2.tdbcompact
----------------------------------------------------------------------
diff --git a/apache-jena/bin/tdb2.tdbcompact b/apache-jena/bin/tdb2.tdbcompact
new file mode 100755
index 0000000..10c28ff
--- /dev/null
+++ b/apache-jena/bin/tdb2.tdbcompact
@@ -0,0 +1,89 @@
+#!/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 JENA_HOME is empty
+if [ -z "$JENA_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
+  JENA_HOME="$( cd "$( dirname "$SCRIPT" )/.." && pwd )"
+  export JENA_HOME
+fi
+
+# If JENA_HOME is a symbolic link need to resolve
+if [ -L "${JENA_HOME}" ]; then
+  JENA_HOME=$(resolveLink "$JENA_HOME")
+  # If link is relative
+  case "$JENA_HOME" in
+    /*)
+      # Already absolute
+      ;;
+    *)
+      # Relative, make absolute
+      JENA_HOME=$(dirname "$JENA_HOME")
+      ;;
+  esac
+  export JENA_HOME
+fi
+
+# ---- Setup
+# JVM_ARGS : don't set here but it can be set in the environment.
+# Expand JENA_HOME but literal *
+JENA_CP="$JENA_HOME"'/lib/*'
+SOCKS=
+LOGGING="${LOGGING:--Dlog4j.configuration=file:$JENA_HOME/jena-log4j.properties}"
+
+# Platform specific fixup
+# On CYGWIN convert path and end with a ';' 
+case "$(uname)" in
+   CYGWIN*) JENA_CP="$(cygpath -wp "$JENA_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 "$JENA_CP" tdb2.tdbcompact "$@" 

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bin/tdb2.tdbdump
----------------------------------------------------------------------
diff --git a/apache-jena/bin/tdb2.tdbdump b/apache-jena/bin/tdb2.tdbdump
new file mode 100755
index 0000000..b5f5121
--- /dev/null
+++ b/apache-jena/bin/tdb2.tdbdump
@@ -0,0 +1,89 @@
+#!/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 JENA_HOME is empty
+if [ -z "$JENA_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
+  JENA_HOME="$( cd "$( dirname "$SCRIPT" )/.." && pwd )"
+  export JENA_HOME
+fi
+
+# If JENA_HOME is a symbolic link need to resolve
+if [ -L "${JENA_HOME}" ]; then
+  JENA_HOME=$(resolveLink "$JENA_HOME")
+  # If link is relative
+  case "$JENA_HOME" in
+    /*)
+      # Already absolute
+      ;;
+    *)
+      # Relative, make absolute
+      JENA_HOME=$(dirname "$JENA_HOME")
+      ;;
+  esac
+  export JENA_HOME
+fi
+
+# ---- Setup
+# JVM_ARGS : don't set here but it can be set in the environment.
+# Expand JENA_HOME but literal *
+JENA_CP="$JENA_HOME"'/lib/*'
+SOCKS=
+LOGGING="${LOGGING:--Dlog4j.configuration=file:$JENA_HOME/jena-log4j.properties}"
+
+# Platform specific fixup
+# On CYGWIN convert path and end with a ';' 
+case "$(uname)" in
+   CYGWIN*) JENA_CP="$(cygpath -wp "$JENA_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 "$JENA_CP" tdb2.tdbdump "$@" 

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bin/tdb2.tdbloader
----------------------------------------------------------------------
diff --git a/apache-jena/bin/tdb2.tdbloader b/apache-jena/bin/tdb2.tdbloader
new file mode 100755
index 0000000..1b3b246
--- /dev/null
+++ b/apache-jena/bin/tdb2.tdbloader
@@ -0,0 +1,89 @@
+#!/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 JENA_HOME is empty
+if [ -z "$JENA_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
+  JENA_HOME="$( cd "$( dirname "$SCRIPT" )/.." && pwd )"
+  export JENA_HOME
+fi
+
+# If JENA_HOME is a symbolic link need to resolve
+if [ -L "${JENA_HOME}" ]; then
+  JENA_HOME=$(resolveLink "$JENA_HOME")
+  # If link is relative
+  case "$JENA_HOME" in
+    /*)
+      # Already absolute
+      ;;
+    *)
+      # Relative, make absolute
+      JENA_HOME=$(dirname "$JENA_HOME")
+      ;;
+  esac
+  export JENA_HOME
+fi
+
+# ---- Setup
+# JVM_ARGS : don't set here but it can be set in the environment.
+# Expand JENA_HOME but literal *
+JENA_CP="$JENA_HOME"'/lib/*'
+SOCKS=
+LOGGING="${LOGGING:--Dlog4j.configuration=file:$JENA_HOME/jena-log4j.properties}"
+
+# Platform specific fixup
+# On CYGWIN convert path and end with a ';' 
+case "$(uname)" in
+   CYGWIN*) JENA_CP="$(cygpath -wp "$JENA_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 "$JENA_CP" tdb2.tdbloader "$@" 

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bin/tdb2.tdbquery
----------------------------------------------------------------------
diff --git a/apache-jena/bin/tdb2.tdbquery b/apache-jena/bin/tdb2.tdbquery
new file mode 100755
index 0000000..aa380fb
--- /dev/null
+++ b/apache-jena/bin/tdb2.tdbquery
@@ -0,0 +1,89 @@
+#!/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 JENA_HOME is empty
+if [ -z "$JENA_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
+  JENA_HOME="$( cd "$( dirname "$SCRIPT" )/.." && pwd )"
+  export JENA_HOME
+fi
+
+# If JENA_HOME is a symbolic link need to resolve
+if [ -L "${JENA_HOME}" ]; then
+  JENA_HOME=$(resolveLink "$JENA_HOME")
+  # If link is relative
+  case "$JENA_HOME" in
+    /*)
+      # Already absolute
+      ;;
+    *)
+      # Relative, make absolute
+      JENA_HOME=$(dirname "$JENA_HOME")
+      ;;
+  esac
+  export JENA_HOME
+fi
+
+# ---- Setup
+# JVM_ARGS : don't set here but it can be set in the environment.
+# Expand JENA_HOME but literal *
+JENA_CP="$JENA_HOME"'/lib/*'
+SOCKS=
+LOGGING="${LOGGING:--Dlog4j.configuration=file:$JENA_HOME/jena-log4j.properties}"
+
+# Platform specific fixup
+# On CYGWIN convert path and end with a ';' 
+case "$(uname)" in
+   CYGWIN*) JENA_CP="$(cygpath -wp "$JENA_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 "$JENA_CP" tdb2.tdbquery "$@" 

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/bin/tdb2.tdbupdate
----------------------------------------------------------------------
diff --git a/apache-jena/bin/tdb2.tdbupdate b/apache-jena/bin/tdb2.tdbupdate
new file mode 100755
index 0000000..b943a18
--- /dev/null
+++ b/apache-jena/bin/tdb2.tdbupdate
@@ -0,0 +1,89 @@
+#!/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 JENA_HOME is empty
+if [ -z "$JENA_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
+  JENA_HOME="$( cd "$( dirname "$SCRIPT" )/.." && pwd )"
+  export JENA_HOME
+fi
+
+# If JENA_HOME is a symbolic link need to resolve
+if [ -L "${JENA_HOME}" ]; then
+  JENA_HOME=$(resolveLink "$JENA_HOME")
+  # If link is relative
+  case "$JENA_HOME" in
+    /*)
+      # Already absolute
+      ;;
+    *)
+      # Relative, make absolute
+      JENA_HOME=$(dirname "$JENA_HOME")
+      ;;
+  esac
+  export JENA_HOME
+fi
+
+# ---- Setup
+# JVM_ARGS : don't set here but it can be set in the environment.
+# Expand JENA_HOME but literal *
+JENA_CP="$JENA_HOME"'/lib/*'
+SOCKS=
+LOGGING="${LOGGING:--Dlog4j.configuration=file:$JENA_HOME/jena-log4j.properties}"
+
+# Platform specific fixup
+# On CYGWIN convert path and end with a ';' 
+case "$(uname)" in
+   CYGWIN*) JENA_CP="$(cygpath -wp "$JENA_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 "$JENA_CP" tdb2.tdbupdate "$@" 

http://git-wip-us.apache.org/repos/asf/jena/blob/3ce06f89/apache-jena/cmd-maker
----------------------------------------------------------------------
diff --git a/apache-jena/cmd-maker b/apache-jena/cmd-maker
index 8f439df..2ce27b6 100755
--- a/apache-jena/cmd-maker
+++ b/apache-jena/cmd-maker
@@ -22,6 +22,9 @@
 ##   It is split into several scripts that leverage a mixture of 
 ##   POSIX and java tools and should be maintained separately
 
+# Not script "jena"
+## the "jena" script is slightly different (see end of script).
+
 CMDS=$(cat <<EOF
 jena.rdfcat
 jena.rdfcompare
@@ -58,6 +61,16 @@ tdb.tdbupdate
 EOF
 )
 
+CMDS2=$(cat <<EOF
+tdb2.tdbbackup
+tdb2.tdbdump
+tdb2.tdbcompact
+tdb2.tdbloader
+tdb2.tdbquery
+tdb2.tdbupdate
+EOF
+)
+
 make_bin()
 {
     local C=$1
@@ -66,6 +79,15 @@ make_bin()
     sed -e "s!JENA_CMD!$C!" < template.bin > $CMD
 }
 
+# These scripts end up with the full name of the command
+make_bin_full()
+{
+    local C=$1
+    # Filename.
+    CMD="bin/$C"
+    sed -e "s!JENA_CMD!$C!" < template.bin > $CMD
+}
+
 make_bat()
 {
     local C=$1
@@ -74,6 +96,15 @@ make_bat()
     sed -e "s!JENA_CMD!$C!" < template.bat > $CMD
 }
 
+make_bat_full()
+{
+    local C=$1
+    # Filename.
+    # Replace '.' by '_'
+    CMD="$(echo "bat/$C" | sed -e s!\\.!_!g).bat"
+    sed -e "s!JENA_CMD!$C!" < template.bat > $CMD
+}
+
 for cmd in $CMDS
 do
     ## echo $cmd
@@ -81,3 +112,11 @@ do
     make_bat $cmd
 done
 
+for cmd in $CMDS2
+do
+    ## echo $cmd
+    make_bin_full $cmd
+    make_bat_full $cmd
+done
+
+