Skip to content
Permalink
Browse files

0001434: shorter classpath, using wildcards when available. consolida…

…te scripts to setenv.
  • Loading branch information...
erilong committed Jan 15, 2014
1 parent e95e861 commit fc5652bcc2ca7c4b07aa605b989684089f534b16
@@ -1,50 +1,24 @@
#!/bin/sh
#
# Run commandline support through DbDump
# Licensed to JumpMind Inc under one or more contributor
# license agreements. See the NOTICE file distributed
# with this work for additional information regarding
# copyright ownership. JumpMind Inc licenses this file
# to you under the GNU General Public License, version 3.0 (GPLv3)
# (the "License"); you may not use this file except in compliance
# with the License.
#

PRGDIR=`dirname "$0"`
if [ "$PRGDIR" = "" ]
then
PRGDIR=`echo $0 | sed 's/\/sym//g'`
fi
if [ "$PRGDIR" = "" ]
then
PRGDIR="."
fi
LIBDIR=$PRGDIR/../lib
WEBLIBDIR=$PRGDIR/../web/WEB-INF/lib
LOG4JXML="file:$PRGDIR/../conf/log4j.xml"
RUNJAVA=java

if [ -n "log4j.xml" -a -f "log4j.xml" ]
then
LOG4JXML="file:$PRGDIR/log4j.xml"
fi

if [ -x "$JAVA_HOME/bin/java" ]
then
RUNJAVA="$JAVA_HOME/bin/java"
fi

CLASSPATH=../patches
SEP=:

if uname | grep -i cygwin > /dev/null
then
SEP=";"
fi

for jar in $LIBDIR/*
do
CLASSPATH=${CLASSPATH}${SEP}${jar}
done

for jar in $WEBLIBDIR/*
do
CLASSPATH=${CLASSPATH}${SEP}${jar}
done

#echo $CLASSPATH

exec "$RUNJAVA" -Duser.language=en -Djava.io.tmpdir=../tmp -Dorg.mortbay.jetty.Request.maxFormContentSize=800000 -Dsym.keystore.file="$PRGDIR/../security/keystore" -Djavax.net.ssl.trustStore="$PRGDIR/../security/cacerts" -Dsun.net.client.defaultReadTimeout=1800000 -Dsun.net.client.defaultConnectTimeout=1800000 -Dlog4j.configuration=$LOG4JXML -cp $CLASSPATH org.jumpmind.symmetric.DbExportCommand "$@"
# You should have received a copy of the GNU General Public License,
# version 3.0 (GPLv3) along with this library; if not, see
# <http://www.gnu.org/licenses/>.
#
# 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.
#

. "`dirname "$0"`/setenv"
exec "$SYM_JAVA" -cp "$CLASSPATH" org.jumpmind.symmetric.DbExportCommand "$@"
@@ -20,16 +20,5 @@
@REM

@echo off

set PRGDIR=%~dp0
set HOMEDIR=%PRGDIR%..
set CONFDIR=%HOMEDIR%\conf
set CLASSPATH=%HOMEDIR%\patches

for %%i in ("%HOMEDIR%\lib\*.jar") do call "%PRGDIR%cpappend.bat" %%i

for %%i in ("%HOMEDIR%\web\WEB-INF\lib\*.jar") do call "%PRGDIR%cpappend.bat" %%i

rem echo CLASSPATH=%CLASSPATH%

java -Duser.language=en -Djava.io.tmpdir=../tmp -Dsym.keystore.file="%HOMEDIR%\security\keystore" -Djavax.net.ssl.trustStore="%HOMEDIR%\security\cacerts" -Dlog4j.configuration="file:%CONFDIR%\log4j.xml" -Dsun.net.client.defaultReadTimeout=1800000 -Dsun.net.client.defaultConnectTimeout=1800000 org.jumpmind.symmetric.DbExportCommand %1 %2 %3 %4 %5 %6 %7 %8 %9
call "%~dp0\setenv.bat"
"%SYM_JAVA%" -cp "%CLASSPATH%" %SYM_OPTIONS% org.jumpmind.symmetric.DbExportCommand %*
@@ -1,50 +1,24 @@
#!/bin/sh
#
# Run commandline support through DbDump
# Licensed to JumpMind Inc under one or more contributor
# license agreements. See the NOTICE file distributed
# with this work for additional information regarding
# copyright ownership. JumpMind Inc licenses this file
# to you under the GNU General Public License, version 3.0 (GPLv3)
# (the "License"); you may not use this file except in compliance
# with the License.
#

PRGDIR=`dirname "$0"`
if [ "$PRGDIR" = "" ]
then
PRGDIR=`echo $0 | sed 's/\/sym//g'`
fi
if [ "$PRGDIR" = "" ]
then
PRGDIR="."
fi
LIBDIR=$PRGDIR/../lib
WEBLIBDIR=$PRGDIR/../web/WEB-INF/lib
LOG4JXML="file:$PRGDIR/../conf/log4j.xml"
RUNJAVA=java

if [ -n "log4j.xml" -a -f "log4j.xml" ]
then
LOG4JXML="file:$PRGDIR/log4j.xml"
fi

if [ -x "$JAVA_HOME/bin/java" ]
then
RUNJAVA="$JAVA_HOME/bin/java"
fi

CLASSPATH=../patches
SEP=:

if uname | grep -i cygwin > /dev/null
then
SEP=";"
fi

for jar in $LIBDIR/*
do
CLASSPATH=${CLASSPATH}${SEP}${jar}
done

for jar in $WEBLIBDIR/*
do
CLASSPATH=${CLASSPATH}${SEP}${jar}
done

#echo $CLASSPATH

exec "$RUNJAVA" -Duser.language=en -Djava.io.tmpdir=../tmp -Dsym.keystore.file="$PRGDIR/../security/keystore" -Djavax.net.ssl.trustStore="$PRGDIR/../security/cacerts" -Dsun.net.client.defaultReadTimeout=1800000 -Dsun.net.client.defaultConnectTimeout=1800000 -Dlog4j.configuration=$LOG4JXML -cp $CLASSPATH org.jumpmind.symmetric.DbFillCommand "$@"
# You should have received a copy of the GNU General Public License,
# version 3.0 (GPLv3) along with this library; if not, see
# <http://www.gnu.org/licenses/>.
#
# 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.
#

. "`dirname "$0"`/setenv"
exec "$SYM_JAVA" -cp "$CLASSPATH" org.jumpmind.symmetric.DbFillCommand "$@"
@@ -20,16 +20,5 @@
@REM

@echo off

set PRGDIR=%~dp0
set HOMEDIR=%PRGDIR%..
set CONFDIR=%HOMEDIR%\conf
set CLASSPATH=%HOMEDIR%\patches

for %%i in ("%HOMEDIR%\lib\*.jar") do call "%PRGDIR%cpappend.bat" %%i

for %%i in ("%HOMEDIR%\web\WEB-INF\lib\*.jar") do call "%PRGDIR%cpappend.bat" %%i

rem echo CLASSPATH=%CLASSPATH%

java -Duser.language=en -Djava.io.tmpdir=../tmp -Dsym.keystore.file="%HOMEDIR%\security\keystore" -Djavax.net.ssl.trustStore="%HOMEDIR%\security\cacerts" -Dlog4j.configuration="file:%CONFDIR%\log4j.xml" -Dsun.net.client.defaultReadTimeout=1800000 -Dsun.net.client.defaultConnectTimeout=1800000 org.jumpmind.symmetric.DbFillCommand %1 %2 %3 %4 %5 %6 %7 %8 %9
call "%~dp0\setenv.bat"
"%SYM_JAVA%" -cp "%CLASSPATH%" %SYM_OPTIONS% org.jumpmind.symmetric.DbFillCommand %*
@@ -1,50 +1,24 @@
#!/bin/sh
#
# Run commandline support through DbDump
# Licensed to JumpMind Inc under one or more contributor
# license agreements. See the NOTICE file distributed
# with this work for additional information regarding
# copyright ownership. JumpMind Inc licenses this file
# to you under the GNU General Public License, version 3.0 (GPLv3)
# (the "License"); you may not use this file except in compliance
# with the License.
#

PRGDIR=`dirname "$0"`
if [ "$PRGDIR" = "" ]
then
PRGDIR=`echo $0 | sed 's/\/sym//g'`
fi
if [ "$PRGDIR" = "" ]
then
PRGDIR="."
fi
LIBDIR=$PRGDIR/../lib
WEBLIBDIR=$PRGDIR/../web/WEB-INF/lib
LOG4JXML="file:$PRGDIR/../conf/log4j.xml"
RUNJAVA=java

if [ -n "log4j.xml" -a -f "log4j.xml" ]
then
LOG4JXML="file:$PRGDIR/log4j.xml"
fi

if [ -x "$JAVA_HOME/bin/java" ]
then
RUNJAVA="$JAVA_HOME/bin/java"
fi

CLASSPATH=../patches
SEP=:

if uname | grep -i cygwin > /dev/null
then
SEP=";"
fi

for jar in $LIBDIR/*
do
CLASSPATH=${CLASSPATH}${SEP}${jar}
done

for jar in $WEBLIBDIR/*
do
CLASSPATH=${CLASSPATH}${SEP}${jar}
done

#echo $CLASSPATH

exec "$RUNJAVA" -Duser.language=en -Djava.io.tmpdir=../tmp -Dorg.mortbay.jetty.Request.maxFormContentSize=800000 -Dsym.keystore.file="$PRGDIR/../security/keystore" -Djavax.net.ssl.trustStore="$PRGDIR/../security/cacerts" -Dsun.net.client.defaultReadTimeout=1800000 -Dsun.net.client.defaultConnectTimeout=1800000 -Dlog4j.configuration=$LOG4JXML -cp $CLASSPATH org.jumpmind.symmetric.DbImportCommand "$@"
# You should have received a copy of the GNU General Public License,
# version 3.0 (GPLv3) along with this library; if not, see
# <http://www.gnu.org/licenses/>.
#
# 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.
#

. "`dirname "$0"`/setenv"
exec "$SYM_JAVA" -cp "$CLASSPATH" org.jumpmind.symmetric.DbImportCommand "$@"
@@ -20,16 +20,5 @@
@REM

@echo off

set PRGDIR=%~dp0
set HOMEDIR=%PRGDIR%..
set CONFDIR=%HOMEDIR%\conf
set CLASSPATH=%HOMEDIR%\patches

for %%i in ("%HOMEDIR%\lib\*.jar") do call "%PRGDIR%cpappend.bat" %%i

for %%i in ("%HOMEDIR%\web\WEB-INF\lib\*.jar") do call "%PRGDIR%cpappend.bat" %%i

rem echo CLASSPATH=%CLASSPATH%

java -Duser.language=en -Djava.io.tmpdir=../tmp -Dsym.keystore.file="%HOMEDIR%\security\keystore" -Djavax.net.ssl.trustStore="%HOMEDIR%\security\cacerts" -Dlog4j.configuration="file:%CONFDIR%\log4j.xml" -Dsun.net.client.defaultReadTimeout=1800000 -Dsun.net.client.defaultConnectTimeout=1800000 org.jumpmind.symmetric.DbImportCommand %1 %2 %3 %4 %5 %6 %7 %8 %9
call "%~dp0\setenv.bat"
"%SYM_JAVA%" -cp "%CLASSPATH%" %SYM_OPTIONS% org.jumpmind.symmetric.DbImportCommand %*
@@ -1,50 +1,24 @@
#!/bin/sh
#
# Run commandline support through DbDump
# Licensed to JumpMind Inc under one or more contributor
# license agreements. See the NOTICE file distributed
# with this work for additional information regarding
# copyright ownership. JumpMind Inc licenses this file
# to you under the GNU General Public License, version 3.0 (GPLv3)
# (the "License"); you may not use this file except in compliance
# with the License.
#

PRGDIR=`dirname "$0"`
if [ "$PRGDIR" = "" ]
then
PRGDIR=`echo $0 | sed 's/\/sym//g'`
fi
if [ "$PRGDIR" = "" ]
then
PRGDIR="."
fi
LIBDIR=$PRGDIR/../lib
WEBLIBDIR=$PRGDIR/../web/WEB-INF/lib
LOG4JXML="file:$PRGDIR/../conf/log4j.xml"
RUNJAVA=java

if [ -n "log4j.xml" -a -f "log4j.xml" ]
then
LOG4JXML="file:$PRGDIR/log4j.xml"
fi

if [ -x "$JAVA_HOME/bin/java" ]
then
RUNJAVA="$JAVA_HOME/bin/java"
fi

CLASSPATH=../patches
SEP=:

if uname | grep -i cygwin > /dev/null
then
SEP=";"
fi

for jar in $LIBDIR/*
do
CLASSPATH=${CLASSPATH}${SEP}${jar}
done

for jar in $WEBLIBDIR/*
do
CLASSPATH=${CLASSPATH}${SEP}${jar}
done

#echo $CLASSPATH

exec "$RUNJAVA" -Duser.language=en -Djava.io.tmpdir=../tmp -Dsym.keystore.file="$PRGDIR/../security/keystore" -Djavax.net.ssl.trustStore="$PRGDIR/../security/cacerts" -Dsun.net.client.defaultReadTimeout=1800000 -Dsun.net.client.defaultConnectTimeout=1800000 -Dlog4j.configuration=$LOG4JXML -cp $CLASSPATH org.jumpmind.symmetric.DbSqlCommand "$@"
# You should have received a copy of the GNU General Public License,
# version 3.0 (GPLv3) along with this library; if not, see
# <http://www.gnu.org/licenses/>.
#
# 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.
#

. "`dirname "$0"`/setenv"
exec "$SYM_JAVA" -cp "$CLASSPATH" org.jumpmind.symmetric.DbSqlCommand "$@"
@@ -20,16 +20,5 @@
@REM

@echo off

set PRGDIR=%~dp0
set HOMEDIR=%PRGDIR%..
set CONFDIR=%HOMEDIR%\conf
set CLASSPATH=%HOMEDIR%\patches

for %%i in ("%HOMEDIR%\lib\*.jar") do call "%PRGDIR%cpappend.bat" %%i

for %%i in ("%HOMEDIR%\web\WEB-INF\lib\*.jar") do call "%PRGDIR%cpappend.bat" %%i

rem echo CLASSPATH=%CLASSPATH%

java -Duser.language=en -Djava.io.tmpdir=../tmp -Dsym.keystore.file="%HOMEDIR%\security\keystore" -Djavax.net.ssl.trustStore="%HOMEDIR%\security\cacerts" -Dlog4j.configuration="file:%CONFDIR%\log4j.xml" -Dsun.net.client.defaultReadTimeout=1800000 -Dsun.net.client.defaultConnectTimeout=1800000 org.jumpmind.symmetric.DbSqlCommand %1 %2 %3 %4 %5 %6 %7 %8 %9
call "%~dp0\setenv.bat"
"%SYM_JAVA%" -cp "%CLASSPATH%" %SYM_OPTIONS% org.jumpmind.symmetric.DbSqlCommand %*
@@ -0,0 +1,23 @@
@REM
@REM Licensed to JumpMind Inc under one or more contributor
@REM license agreements. See the NOTICE file distributed
@REM with this work for additional information regarding
@REM copyright ownership. JumpMind Inc licenses this file
@REM to you under the GNU General Public License, version 3.0 (GPLv3)
@REM (the "License"); you may not use this file except in compliance
@REM with the License.
@REM
@REM You should have received a copy of the GNU General Public License,
@REM version 3.0 (GPLv3) along with this library; if not, see
@REM <http://www.gnu.org/licenses/>.
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM

@echo off
"%SYM_JAVA%" -version 2>&1 | find /c """1.5"

0 comments on commit fc5652b

Please sign in to comment.
You can’t perform that action at this time.