db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r924209 - in /db/derby/code/trunk: ./ bin/ bin/templates/ tools/release/
Date Wed, 17 Mar 2010 10:32:27 GMT
Author: kahatlen
Date: Wed Mar 17 10:32:26 2010
New Revision: 924209

URL: http://svn.apache.org/viewvc?rev=924209&view=rev
Log:
DERBY-3207: Allow bin scripts to run without DERBY_HOME set

Inline the contents of derby_common.sh in the shell scripts at build
time so that they contain the necessary logic to find the jar files
even when DERBY_HOME has not been set.

Added:
    db/derby/code/trunk/bin/templates/
    db/derby/code/trunk/bin/templates/NetworkServerControl
      - copied, changed from r923218, db/derby/code/trunk/bin/NetworkServerControl
    db/derby/code/trunk/bin/templates/dblook
      - copied, changed from r923218, db/derby/code/trunk/bin/dblook
    db/derby/code/trunk/bin/templates/derby_common.sh
      - copied unchanged from r923218, db/derby/code/trunk/bin/derby_common.sh
    db/derby/code/trunk/bin/templates/ij
      - copied, changed from r923218, db/derby/code/trunk/bin/ij
    db/derby/code/trunk/bin/templates/startNetworkServer
      - copied, changed from r923218, db/derby/code/trunk/bin/startNetworkServer
    db/derby/code/trunk/bin/templates/stopNetworkServer
      - copied, changed from r923218, db/derby/code/trunk/bin/stopNetworkServer
    db/derby/code/trunk/bin/templates/sysinfo
      - copied, changed from r923218, db/derby/code/trunk/bin/sysinfo
Removed:
    db/derby/code/trunk/bin/NetworkServerControl
    db/derby/code/trunk/bin/dblook
    db/derby/code/trunk/bin/derby_common.sh
    db/derby/code/trunk/bin/ij
    db/derby/code/trunk/bin/startNetworkServer
    db/derby/code/trunk/bin/stopNetworkServer
    db/derby/code/trunk/bin/sysinfo
Modified:
    db/derby/code/trunk/build.xml
    db/derby/code/trunk/tools/release/build.xml

Copied: db/derby/code/trunk/bin/templates/NetworkServerControl (from r923218, db/derby/code/trunk/bin/NetworkServerControl)
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/bin/templates/NetworkServerControl?p2=db/derby/code/trunk/bin/templates/NetworkServerControl&p1=db/derby/code/trunk/bin/NetworkServerControl&r1=923218&r2=924209&rev=924209&view=diff
==============================================================================
--- db/derby/code/trunk/bin/NetworkServerControl (original)
+++ db/derby/code/trunk/bin/templates/NetworkServerControl Wed Mar 17 10:32:26 2010
@@ -17,13 +17,5 @@
 # specific language governing permissions and limitations
 # under the License.
 
-if [ -z "$DERBY_HOME" ] ; then
-  echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable"
-  echo "to the location of your Derby installation."
-  exit 1
-fi
-
-. $DERBY_HOME/bin/derby_common.sh
-
 derby_exec_command="exec \"$JAVACMD\" $DERBY_OPTS -classpath \"$LOCALCLASSPATH\" org.apache.derby.drda.NetworkServerControl
$@"
 eval $derby_exec_command

Copied: db/derby/code/trunk/bin/templates/dblook (from r923218, db/derby/code/trunk/bin/dblook)
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/bin/templates/dblook?p2=db/derby/code/trunk/bin/templates/dblook&p1=db/derby/code/trunk/bin/dblook&r1=923218&r2=924209&rev=924209&view=diff
==============================================================================
--- db/derby/code/trunk/bin/dblook (original)
+++ db/derby/code/trunk/bin/templates/dblook Wed Mar 17 10:32:26 2010
@@ -17,12 +17,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-if [ -z "$DERBY_HOME" ] ; then
-  echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable"
-  echo "to the location of your Derby installation."
-  exit 1
-fi
-
-. $DERBY_HOME/bin/derby_common.sh
-
 exec "$JAVACMD" $DERBY_OPTS -classpath "$LOCALCLASSPATH" org.apache.derby.tools.dblook "$@"

Copied: db/derby/code/trunk/bin/templates/ij (from r923218, db/derby/code/trunk/bin/ij)
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/bin/templates/ij?p2=db/derby/code/trunk/bin/templates/ij&p1=db/derby/code/trunk/bin/ij&r1=923218&r2=924209&rev=924209&view=diff
==============================================================================
--- db/derby/code/trunk/bin/ij (original)
+++ db/derby/code/trunk/bin/templates/ij Wed Mar 17 10:32:26 2010
@@ -17,14 +17,6 @@
 # specific language governing permissions and limitations
 # under the License.
 
-if [ -z "$DERBY_HOME" ] ; then
-  echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable"
-  echo "to the location of your Derby installation."
-  exit 1
-fi
-
-. $DERBY_HOME/bin/derby_common.sh
-
 # Execute derby using eval/exec to preserve spaces in paths,
 # java options, and derby args
 derby_exec_command="exec \"$JAVACMD\" $DERBY_OPTS -classpath \"$LOCALCLASSPATH\" org.apache.derby.tools.ij
$@"

Copied: db/derby/code/trunk/bin/templates/startNetworkServer (from r923218, db/derby/code/trunk/bin/startNetworkServer)
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/bin/templates/startNetworkServer?p2=db/derby/code/trunk/bin/templates/startNetworkServer&p1=db/derby/code/trunk/bin/startNetworkServer&r1=923218&r2=924209&rev=924209&view=diff
==============================================================================
--- db/derby/code/trunk/bin/startNetworkServer (original)
+++ db/derby/code/trunk/bin/templates/startNetworkServer Wed Mar 17 10:32:26 2010
@@ -17,13 +17,5 @@
 # specific language governing permissions and limitations
 # under the License.
 
-if [ -z "$DERBY_HOME" ]; then
-  echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable"
-  echo "to the location of your Derby installation."
-  exit 1
-fi
-
-. $DERBY_HOME/bin/derby_common.sh
-
 derby_exec_command="exec \"$JAVACMD\" $DERBY_OPTS -classpath \"$LOCALCLASSPATH\" org.apache.derby.drda.NetworkServerControl
start $@"
 eval $derby_exec_command

Copied: db/derby/code/trunk/bin/templates/stopNetworkServer (from r923218, db/derby/code/trunk/bin/stopNetworkServer)
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/bin/templates/stopNetworkServer?p2=db/derby/code/trunk/bin/templates/stopNetworkServer&p1=db/derby/code/trunk/bin/stopNetworkServer&r1=923218&r2=924209&rev=924209&view=diff
==============================================================================
--- db/derby/code/trunk/bin/stopNetworkServer (original)
+++ db/derby/code/trunk/bin/templates/stopNetworkServer Wed Mar 17 10:32:26 2010
@@ -17,13 +17,5 @@
 # specific language governing permissions and limitations
 # under the License.
 
-if [ -z "$DERBY_HOME" ]; then
-  echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable"
-  echo "to the location of your Derby installation."
-  exit 1
-fi
-
-. $DERBY_HOME/bin/derby_common.sh
-
 derby_exec_command="exec \"$JAVACMD\" $DERBY_OPTS -classpath \"$LOCALCLASSPATH\" org.apache.derby.drda.NetworkServerControl
shutdown $@"
 eval $derby_exec_command

Copied: db/derby/code/trunk/bin/templates/sysinfo (from r923218, db/derby/code/trunk/bin/sysinfo)
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/bin/templates/sysinfo?p2=db/derby/code/trunk/bin/templates/sysinfo&p1=db/derby/code/trunk/bin/sysinfo&r1=923218&r2=924209&rev=924209&view=diff
==============================================================================
--- db/derby/code/trunk/bin/sysinfo (original)
+++ db/derby/code/trunk/bin/templates/sysinfo Wed Mar 17 10:32:26 2010
@@ -17,13 +17,5 @@
 # specific language governing permissions and limitations
 # under the License.
 
-if [ -z "$DERBY_HOME" ]; then
-  echo "Error: DERBY_HOME is not set. Please set the DERBY_HOME environment variable"
-  echo "to the location of your Derby installation."
-  exit 1
-fi
-
-. $DERBY_HOME/bin/derby_common.sh
-
 derby_exec_command="exec \"$JAVACMD\" $DERBY_OPTS -classpath \"$LOCALCLASSPATH\" org.apache.derby.tools.sysinfo
$@"
 eval $derby_exec_command

Modified: db/derby/code/trunk/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/build.xml?rev=924209&r1=924208&r2=924209&view=diff
==============================================================================
--- db/derby/code/trunk/build.xml (original)
+++ db/derby/code/trunk/build.xml Wed Mar 17 10:32:26 2010
@@ -32,7 +32,7 @@
 
 <!-- Targets -->
 
-  <target name="buildsource" depends="checkCompilerLevel,init,prebuild,setCompilerProperties,jsr169stubs,jdbc3stubs,jdbc4stubs,felixStubs,engine,storeless,tools,drda,client,build,versioninfo,localeinfo"/>
+  <target name="buildsource" depends="checkCompilerLevel,init,prebuild,setCompilerProperties,jsr169stubs,jdbc3stubs,jdbc4stubs,felixStubs,engine,storeless,tools,drda,client,build,versioninfo,localeinfo,binscripts"/>
   <target name="all" depends="buildsource,demo,testing,pptesting,runmessagecheck"/>
 
 <!-- ==================================================================== -->
@@ -728,6 +728,44 @@
   </target>
 
 <!-- =================================================================== -->
+<!--                     Build the Unix shell scripts under bin          -->
+<!-- =================================================================== -->
+
+<target name="binscripts">
+  <antcall target="makebinscript">
+    <param name="script" value="dblook"/>
+  </antcall>
+
+  <antcall target="makebinscript">
+    <param name="script" value="ij"/>
+  </antcall>
+
+  <antcall target="makebinscript">
+    <param name="script" value="sysinfo"/>
+  </antcall>
+
+  <antcall target="makebinscript">
+    <param name="script" value="NetworkServerControl"/>
+  </antcall>
+
+  <antcall target="makebinscript">
+    <param name="script" value="startNetworkServer"/>
+  </antcall>
+
+  <antcall target="makebinscript">
+    <param name="script" value="stopNetworkServer"/>
+  </antcall>
+</target>
+
+<target name="makebinscript">
+  <concat destfile="bin/${script}">
+    <fileset file="bin/templates/derby_common.sh"/>
+    <fileset file="bin/templates/${script}"/>
+  </concat>
+  <chmod perm="+x" file="bin/${script}"/>
+</target>
+
+<!-- =================================================================== -->
 <!--                     Remove generated message files                   -->
 <!-- =================================================================== -->
   <target name="cleanmessages">
@@ -1835,23 +1873,23 @@
     <property file="${basedir}/snapshot/maintversion.properties"/>
     <zip destfile="${basedir}/snapshot/db-derby-snapshot-${major}.${minor}.${interim}.${point}-${changenumber}.zip">
       <zipfileset prefix="db-derby-snapshot-${major}.${minor}.${interim}.${point}-${changenumber}/lib"
dir="${basedir}/jars/insane" includes="*.jar,*.war"/>
-      <zipfileset prefix="db-derby-snapshot-${major}.${minor}.${interim}.${point}-${changenumber}"
dir="${basedir}" includes="bin/**,LICENSE,NOTICE,README,javadoc/publishedapi/**"/>
+      <zipfileset prefix="db-derby-snapshot-${major}.${minor}.${interim}.${point}-${changenumber}"
dir="${basedir}" includes="bin/**,LICENSE,NOTICE,README,javadoc/publishedapi/**" excludes="bin/templates/**"/>
     </zip>
     <tar destfile="${basedir}/snapshot/db-derby-snapshot-${major}.${minor}.${interim}.${point}-${changenumber}.tar.gz"
          compression="gzip">
       <tarfileset prefix="db-derby-snapshot-${major}.${minor}.${interim}.${point}-${changenumber}/lib"
dir="${basedir}/jars/insane" includes="*.jar,*.war"/>
-      <tarfileset prefix="db-derby-snapshot-${major}.${minor}.${interim}.${point}-${changenumber}"
dir="${basedir}" includes="bin,LICENSE,NOTICE,README,javadoc/publishedapi/**"/>
+      <tarfileset prefix="db-derby-snapshot-${major}.${minor}.${interim}.${point}-${changenumber}"
dir="${basedir}" includes="bin/**,LICENSE,NOTICE,README,javadoc/publishedapi/**" excludes="bin/templates/**"/>
     </tar>
 
     <!-- debug archives - DERBY-178 --> 
     <zip destfile="${basedir}/snapshot/db-derby-snapshot-debug-${major}.${minor}.${interim}.${point}-${changenumber}.zip">
       <zipfileset prefix="db-derby-snapshot-debug-${major}.${minor}.${interim}.${point}-${changenumber}/lib"
dir="${basedir}/jars/sane" includes="*.jar,*.war"/>
-      <zipfileset prefix="db-derby-snapshot-debug-${major}.${minor}.${interim}.${point}-${changenumber}"
dir="${basedir}" includes="bin/**,LICENSE,NOTICE,CHANGES,README,javadoc/publishedapi/**"/>
+      <zipfileset prefix="db-derby-snapshot-debug-${major}.${minor}.${interim}.${point}-${changenumber}"
dir="${basedir}" includes="bin/**,LICENSE,NOTICE,CHANGES,README,javadoc/publishedapi/**" excludes="bin/templates/**"/>
     </zip>
     <tar destfile="${basedir}/snapshot/db-derby-snapshot-debug-${major}.${minor}.${interim}.${point}-${changenumber}.tar.gz"
          compression="gzip">
       <tarfileset prefix="db-derby-snapshot-debug-${major}.${minor}.${interim}.${point}-${changenumber}/lib"
dir="${basedir}/jars/sane" includes="*.jar,*.war"/>
-      <tarfileset prefix="db-derby-snapshot-debug-${major}.${minor}.${interim}.${point}-${changenumber}"
dir="${basedir}" includes="bin/**,LICENSE,NOTICE,README,javadoc/publishedapi/**"/>
+      <tarfileset prefix="db-derby-snapshot-debug-${major}.${minor}.${interim}.${point}-${changenumber}"
dir="${basedir}" includes="bin/**,LICENSE,NOTICE,README,javadoc/publishedapi/**" excludes="bin/templates/**"/>
     </tar>
 
     <copy file="${basedir}/jars/insane/derby_core_plugin_${major}.${minor}.${interim}.zip"

Modified: db/derby/code/trunk/tools/release/build.xml
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/release/build.xml?rev=924209&r1=924208&r2=924209&view=diff
==============================================================================
--- db/derby/code/trunk/tools/release/build.xml (original)
+++ db/derby/code/trunk/tools/release/build.xml Wed Mar 17 10:32:26 2010
@@ -156,7 +156,7 @@
       <zipfileset dir="${basedir}" includes="index.html" prefix="${derby.bin}/"/>
       <!-- bin -->
       <zipfileset dir="${basedir}/bin" prefix="${derby.bin}/bin" 
-                  filemode="755" includes="*"/>
+                  filemode="755" includes="*" excludes="templates"/>
       <!-- demo -->
       <zipfileset file="${derby.demo.src.dir}/README.txt"
                   fullpath="${derby.bin}/demo/README.txt"/>
@@ -213,7 +213,7 @@
       <tarfileset dir="${basedir}" includes="index.html" prefix="${derby.bin}/"/>
       <!-- bin -->
       <tarfileset dir="${basedir}/bin" prefix="${derby.bin}/bin" 
-                  mode="755" includes="*"/>
+                  mode="755" includes="*" excludes="templates"/>
       <!-- demo -->
       <tarfileset file="${derby.demo.src.dir}/README.txt"
                   fullpath="${derby.bin}/demo/README.txt"/>



Mime
View raw message